codenameone - CN1 Socket cannot send >7200 bytes -
having trouble sending large number of bytes cn1 client server. code below works less ~7200 bytes. @ byte 7240 bytes received server becomes zeroes. not sure why occurring, connection still live. server can still push bytes unsure why client cannot send more data ~7200. advice appreciated. thanks!
if (!outgoingmessages.isempty()) { socket.connect("my.server.net", 1234, new socketconnection() { @override public void connectionestablished(inputstream instream, outputstream outstream) { try { byte[] msgbytes = outgoingmessages.pop(); outstream.write(byteconvertor.inttobytes(msgbytes.length)); outstream.write(msgbytes); } catch(exception err) { err.printstacktrace(); } } @override public void connectionerror(int errorcode, string message) { system.out.println("error"); } }); }
clarification: specific com.codename1.io.socket , not steve's cn1sockets lib
i think might have been fixed pull request, not available in simulator builds yet should work in source/device. should update plugin week @ point code should "just work".
Comments
Post a Comment