Click here to Skip to main content
13,090,178 members (49,784 online)
Rate this:
Please Sign up or sign in to vote.
See more:
First let me start off by saying that I have dealt with Winsock for MANY years and am attempting to convert my project over from vb6 to VB.Net.

This program was made to handle up to 70 connections at a time and constantly sending data from Server to clients and back.

There is one packet however, that reaches up to be around 177kb when sent. The sockets are set up to sent 1kb at a time.... (No other packet actually uses the whole kb). It seems that after the server sends this large packet... the client receives the data out of order. After debugging and monitoring I find that it normally happens between 3-4kb. While the first 3 are good and in order.

My question is, is there a different system I should use instead of just Sockets (I have had similar problems with TCPClient) and/or can someone maybe link me to a sample project that would not have this error?

Posted 10-Oct-10 4:51am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

When just using sockets (just IP) it is possible for receiving datagrams out-of-order. When using the Transport Control Layer the segments of these datagrams are ensured to be in-order. You should use TCP on both ends to ensure that it works correct. You mention that you use TCPClient but do you also use TCPServer? When using TCP the problem of receiving data out-of-order is solved.

Good luck!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.170813.1 | Last Updated 11 Oct 2010
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100