Click to See Complete Forum and Search --> : Any way to flush socket?


kuang Cao
October 17th, 2002, 01:50 PM
Hi, All,

Right now I am writing part of the application using unix socket with c++ to communicate with another socket written with tcl. The tcl socket runs under winNT. I can receive msgs from the tcl socket OK, but I can not send any msg because the tcl socket doesn't seem to receive and I can not debug that part. I checked the size returned by send and it was the number I wanted to send. So my question is, is there any way to flush the socket to make sure it was not buffered somewhere, instead, send it out immediately. Does the socket send out the content immediately? Thanks a lot.

Kevin

galathaea
October 17th, 2002, 02:05 PM
Debugging socket communications can be hard, so it is a good idea to have a packet sniffer checking out what is being sent and received on both sides.
As to whether the communication is buffered, it depends on what level you are coding for. Most of the upper level routines for communications do use some form of buffering to accomodate the packeting mechanism, but it should be sent out eventually.

kuang Cao
October 17th, 2002, 02:31 PM
Packet Sniffer? Will the system admin go after me? Any suggestion on what sniffer to use?