I did the following to the method run in ConnectionHandler on the
server side...

                if (is.read(inData) < 0)
                    break;
                for (numBytes = 0; inData[numBytes] != '\n'; numBytes+
+);
                System.out.println("[" + connectionID + "]: " +
                        new String(inData, 0, numBytes));

Even if I fixed the number of bytes sent from the client the server
would always read 100 bytes.  So the fix should be on the server side
and not necessarily the client.  The change about sets the size of the
number of bytes before the newline character and then creates the
string based on that size rather than 100 bytes.

Sparky

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to