VB Winsock Question.

Discussion in 'OT Technology' started by kewlb, Mar 16, 2004.

  1. kewlb

    kewlb Guest

    Hey everyone,

    Using the winsock VB Controll if I stack .SendData statements togther it winds up lumping them into one send when it reaches the client. This is causing a lot of problems as the way I am getting around it seems like a very poor way of doing it. Does anyone have a better way to avoid this?

    What I do:

    I created a global variable named WS_SEND_COMPLETE.

    before I send data I set WS_SEND_COMPLETE to 0
    in the WinSock properties under sendcomplete I set WS_SEND_COMPLETE to 1.

    I create a statement after I set the WS_SEND_COMPLETE that reads:

    do until WS_SEND_COMPLETE = 1

    so it looks like:

    winsock1.senddata Some Data
    do until WS_SEND_COMPLETE = 1
    winsock1.SendData Some Other Data

    Sure this way works -- but what if I have 1000 clients connected this would seem like a VERY VERY poor way of handling this. Who knows a better way?

Share This Page