Results 1 to 3 of 3

Thread: Winsock buffering before send

  1. #1
    Guest

    Angry

    I have been writing a chat client/server to familiarize myself with the Winsock control. I'm using TCP, not UDP, for the connection protocol. The server has a Winsock control array that it grows as clients attach, and a collection class to store information on users. All this seems to work fine, but I'm having one inexplicable problem. It may be my code, or it may be a functionality issue with the control.

    My question is, does the Winsock control buffer data before sending it in one lump sum? It looks like that's what's happening. If so, is there a way around this?

  2. #2
    Guest

    Thumbs up found the answer

    I found that I can use the API in conjunction with the OCX control just for the send() function to produce the desired result.

  3. #3
    Lively Member
    Join Date
    Nov 1999
    Location
    Melbourne, Victoria, Australia
    Posts
    126
    Yes... it's a bug in the winsock control that you are experiencing... Try the following code..

    'doesn't work as buffer bug takes effect
    For X = 1 to 10
    Winsock(x).SendData MessageStr
    Next X

    'works perfectly as buffer is dumped each loop
    For X = 1 to 10
    Winsock(x).SendData MessageStr
    DoEvents
    Next X
    Regards,

    Paul Rivoli
    ---------------------
    [email protected]
    http://members.dingoblue.net.au/~privoli

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