CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2000
    Posts
    8

    TCP/Winsock problem

    I've just recently tried doing something with the Winsock control, and have come to a wall. The problem is I noticed that if I send several data consecutivly it either gets "lost" if sent to different clients or sent all at once if sent to one client. The problem: Say you have one Server and two Client forms/apps communicating via TCP. Server has an array of tcpServer controls. If I do:

    ...
    tcpServer(1).SendData someData
    tcpServer(2).SendData someData
    ...



    it appears that only the client 2 recieved its data.

    If there is only one client and what he does is .AddItem to a ListBox after he recieves something, then few lines of sending data:

    ...
    tcpServer.SendData data1
    tcpServer.SendData data2
    tcpServer.SendData data3
    ...



    turn up on the client as only one Item in the ListBox (as data1data2data3) Instead 3 different items. What I know, is that it is not the case if I make pauses between sending. (Like if I make a timer to send data every 1ms, it gets there the proper way.

    My question: Why? How do I fix this? What did I did wrong?


  2. #2
    Join Date
    Jul 2000
    Posts
    8

    Re: TCP/Winsock problem

    Anyway, I have found an answer on http://support.microsoft.com/support.../q245/1/59.asp that it's a bug and it was fixed in SP4.


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