Closed axw closed 12 years ago
(by axwalk) This is due to the use of socket.makefile, which acts like a Python file object, in that it does not return partial results. Rather than use socket.makefile, I'll have to create a new InputStream class which calls the socket.recv method.
With an InputStream returned from java.net.Socket, a call to InputStream.read(byte[] buf, int offset, int length) may return less than the requested number of bytes. A RemoteSocket's InputStream will block until all "length" bytes are available.
Imported from Launchpad using lp2gh.