socket.io-client-java icon indicating copy to clipboard operation
socket.io-client-java copied to clipboard

This framework is not designed for multi-thread java application?

Open zhongqiu-jiang opened this issue 5 years ago • 2 comments

As I see the thread model is base on EventThread.java, which is included in engine-io.

zhongqiu-jiang avatar Sep 26 '20 11:09 zhongqiu-jiang

Hi! In its current form, the Socket object is indeed not thread safe. I'm not sure the effort that would be required to make it thread safe though.

The EventThread is meant for use in an Android application, in order not to block the main thread.

darrachequesne avatar Dec 21 '20 09:12 darrachequesne

Hi there, thanks for your reply, what im doing is: Use this framework in my java server side service "A", and as a client side which connects to a netty-socketio server. So all the users in my "A" programme share this EventThread, which i found it's a single thread design. But i suppose it only responses for protocol encoding/decoding, so it will not pull down the system performance.

zhongqiu-jiang avatar Dec 21 '20 10:12 zhongqiu-jiang