On 8/14/07, leecholho <[EMAIL PROTECTED]> wrote:
>
> hi..
> i'm testing a modified source of sample chat server source.. client program
> is flash,
>
> flash transmitted message that added "\r\n" to the message.
> and java server(multi-thread base) is return message that added "\0" to the
> return message.
>
> i used same source the recevie and send part. first message is not problem.
> server is recevied and return ok message the client, and client is recevied
> ok message. but client next message is sent to server, server received empty
> message.
>
> what is problem?
> [ client source ]
> function handleIncoming (messageObj) {
> var tag=messageObj.firstChild.firstChild.nodeValue;
> if(tag == "LOGINS"){
> mySocket.send("PN\r\n");
> }
> }
> mySocket.connected = true;
> mySocket.send("LOGIN"+"\t"+userid+"\r\n");
> [ /client source]
Doesn't the client send a trailing '\0' after \r\n? Please try to use
a packet analyzer such as Wireshark to see what client is exactly
sending. If the client is sending a NUL character, you can get an
empty string. Please let me know what the client is sending, so I can
help you track down the problem.
HTH,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6