[xSocket-develop] XSocket non-blocking can't be established
Status: Inactive
Brought to you by:
grro
|
From: Steven Ma <ste...@em...> - 2009-08-05 07:34:39
|
Dear sir,
We found that after a number of connections are established and then disconnected for a certain period of time, a new non-blocking connection can’t be established anymore. However, we are not sure about the timing of this period. It should be around 7 to 23 hours. According to xsocket source code, we go through the detail and we found that:
The program always stopped when calling connection.init(ioHandler) in Server.LifeCycleHandler.onConnectionAccepted(IoChainableHandler)
Below is the "Call Hierarchy" that we chase into:
IoAcceptor.accept()
-> Server.LifeCycleHandler.onConnectionAccepted(IoChainableHandler)
-> NonBlockingConnection.init(IoChainableHandler)
-> NonBlockingConnection.init(IoChainableHandler, IIoHandlerCallback)
-> IoSocketHandler.init(IIoHandlerCallback)
-> IoChainableHandler.setPreviousCallback(IIoHandlerCallback)
-> IoSocketDispatcher.register(IoSocketHandler, int)
-> ... (we guess the program may be stopped in this method somewhere)
xsocket.connection.Server.java
public void onConnectionAccepted(IoChainableHandler ioHandler) throws IOException {
// create a new connection
NonBlockingConnection connection = new NonBlockingConnection(connectionManager, handlerAdapter.getConnectionInstance());
// set default flush properties
………
// initialize the connection
connection.init(ioHandler);
// set timeouts (requires that connection is already initialized)
……..
// set transfer rates
………
}
We are testing it under xsocket v2.5.4. I’d like to know how to solve or work around this problem. Thanks.
Regards,
Steven Ma
________________________________
EMPEROR GROUP
>From innovation to motivation - Since 1942
Head Office: 28/F Emperor Group Centre, 288 Hennessy Road, Wanchai, Hong Kong
Prime Line: (852) 2835 6688 .. Fax: (852) 2835 8188 ... Website: www.emperor.com.hk
________________________________
DISCLAIMER
This email only contains the personal opinion of the sender. It does not constitute formal advice or commitment by the sender or Emperor Group. This email may contain confidential material. Any unauthorized use or dissemination is prohibited. If you are not the named recipient, please delete it and notify the sender immediately.
免責聲明
本郵件只包含寄件者的個人意見,並不構成寄件者或英皇集團的正式意見或承諾。本郵件可能含有機密的訊息,未經許可,不得使用或發送本郵件內任何資料。如你並非上列收件者,請你立即刪除本郵件並通知寄件者。
|