I use the following codes to implement sock communication with server (done
in VC):
   CNetLib nlib;
   nlib.Open();
   CNetLibClientStream clientSock(&nlib, netSocketTypeStream,
                                  netSocketProtoIPTCP, "localhost",6060,
9999);
   clientSock << msg; //msg = "hello"
   Char szMessage[256];
   clientSock >> szMessage;

I have 2 questions:
1.Why the server keep recieving "" message from this socket after excuted
"clientSock << msg;"?
2.In the server, if received "hello", it will send "hi" and then "How are
you" after a while to the client. But I never receieve the 2nd message, only
the 1st message can be catched, even I use two "clientSock >> szMessage;"
What happen to this problem?

Thanks a lot!
Fan




-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to