CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2001
    Posts
    131

    Any way to flush socket?

    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

  2. #2
    Join Date
    Sep 2002
    Posts
    1,747

    get a packet sniffer

    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.

  3. #3
    Join Date
    Apr 2001
    Posts
    131
    Packet Sniffer? Will the system admin go after me? Any suggestion on what sniffer to use?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured