F
Frank Rizzo
Hello, I am having a bit of trouble understanding how tcp/ip works. As
a point of reference, with a serial port you essentially get byte by
byte in the same order that it was sent out.
With TCP/IP, because it may route individual packets via different
paths, does a possibility exist that I will get some packets out of
order? Or is this something that is handled by the tcp/ip stack?
Secondly, how can I send tcp/ip data (i.e. length of data) to guarantee
that when I call do the following:
byte[] Receiving = new byte[100000];
m_Socket.Receive(Receiving, 0, m_Socket.Available, SocketFlags.None);
that I get everything I sent in one shot. So for instance, if the
client sends: "the brown fox jumped over the i can't remember what", I
want to be sure that when the server calls the piece of code above, that
the entire string is in the Receiving array.
Thanks.
a point of reference, with a serial port you essentially get byte by
byte in the same order that it was sent out.
With TCP/IP, because it may route individual packets via different
paths, does a possibility exist that I will get some packets out of
order? Or is this something that is handled by the tcp/ip stack?
Secondly, how can I send tcp/ip data (i.e. length of data) to guarantee
that when I call do the following:
byte[] Receiving = new byte[100000];
m_Socket.Receive(Receiving, 0, m_Socket.Available, SocketFlags.None);
that I get everything I sent in one shot. So for instance, if the
client sends: "the brown fox jumped over the i can't remember what", I
want to be sure that when the server calls the piece of code above, that
the entire string is in the Receiving array.
Thanks.