[Jslib] Reading available data on recently closed sockets

Rajeev J Sebastian rajeev.sebastian at gmail.com
Sat Dec 1 08:51:46 PST 2007

Hello Nick,

On Dec 1, 2007 4:33 AM, Nick P <nick.pend at gmail.com> wrote:
> I am still attempting to use JSLib as a client for a server.  After the
> server sends a reply message, it closes the socket.  Up until the socket is
> closed by the server, the XUL client recognizes that there is data
> available.  When I built a sample client in VB.net, I was able to read the
> available data even after the server closed the socket.  However, with the
> JSLib sockets, I have been unable to get it to read the data after the
> server closes the socket.
> Am I wrong that this data should still be available for reading, or is this
> unexpected behavior?

I ran the equivalent with Python, and I can reproduce the above behaviour.

I used a Python based socket server and client.(based on
http://docs.python.org/lib/socket-example.html, only the server closes
the client after receving three times)

With (unmodified) socket.xul, it just gives a message that the socket
was closed. However, with the Python client, it returns the data.

I havent done any extensive testing or anythign ... just a 15 minute job.

Rajeev J Sebastian

More information about the Jslib mailing list