yanis lisima
unread,Dec 5, 2012, 7:52:04 AM12/5/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to json...@googlegroups.com
Hy all.
While designing a jsonrpc server/client infrastructure, I have noticed that client socket connections stay in CLOSE_WAIT state even if the client has called close on the other end of the socket. Endeed some reseach on JAVA socket allow me to say in this case that the application have to close the socket on both sides explicitly: in a client/server architecture the client should tell the server when disconnecting. A half-way to slove this matter is to apply a Timeout beetween two client's messages: if the client does not send data in less than an amont of time the server close the connection. To do so I have made some changes in StreamServer.java in order to check data in the input stream with a timer.
Read the attached file for details.
My solution pass tests, but if you see some change to apply do not hesitate to tell me.
From now I will search for a way of creating a JsonRPC service for managing clients and allow client to disconnect and chage timout settings.
bye,