baswerc / niossl Goto Github PK
View Code? Open in Web Editor NEWSSLSocketChannel and SSLServerSocketChannel Implementations
License: Apache License 2.0
SSLSocketChannel and SSLServerSocketChannel Implementations
License: Apache License 2.0
The write method always return 0. So i have to register write event many times
Hi,
I found another bug: When using a Selector for the innser Stream it could be possible that the selector does not wake up even there is data to Read. This is caused through a unwrap inside the write-Method of the ssl engine
Example:
Registering WRITE | READ SelectionKey for inner socket in selector.
Selector call comes back, because data could be written to channel. During writing the channel receives other data (= read out from socket) which is unwrapped to the unwrapped buffer.
Afterwards we are back in the application flow. Now we are only interested in the answer (which is already unwrapped) so we set the interest to READ and trigger the select()-method of the application again.
At this point the select()-method will only return when there is another data incoming to the channel.
Regards,
Manuel
could you please tell me what is it?
so much com.android.org.conscrypt.SSLEngineImpl not free that leads to memory leak
here is my code:
public static SSLSocketChannel open(SocketChannel socket) {
try {
SSLEngine sslEngine = null;
SSLContext sslContext = SSLContext.getDefault();
if( sslContext != null ) {
sslEngine = sslContext.createSSLEngine();
} else {
throw new Exception("create sslContext Failed");
}
if (sslEngine != null ) {
sslEngine.setUseClientMode(true);
} else {
throw new Exception("create sslEngine Failed");
}
if( CommonService.ssllogger == null ) {
CommonService.ssllogger = new SSLDebugInfo();
}
if( CommonService.executors == null ) {
CommonService.executors = Executors.newFixedThreadPool(5);
}
return new SSLSocketChannel(socket,sslEngine,CommonService.executors,CommonService.ssllogger);
} catch ( Exception e ) {
log("Exception!!!" + e.toString());
return null;
}
}
Hi developer,
first of all thanks for this slim SSLChannel library! It makes a lot of things much easier.
I got to an point where I want to wait for data. I am in blocking mode, but read() and write() does not block at this point. The normal behavior would be that it returns when at least one byte could be read/written.
Regards,
Manuel
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.