wrong # bytes on socket

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

one thing to keep in mind is that i've written multiple
tcp apps in .net 2002 and 2003, and haven't seen this
problem before. I have a simple socket app where a
client sends some # of bytes to the server, where the
server responds back with the same # bytes. i set this
value to 441 bytes (so that it is an odd number). the
server receives 8,000 bytes. always. no matter what.
every single time. i send 441 bytes 1 time and the
server receives 8,000 bytes. the bytes are repeated
almost 20 times. i check the data and it matches what i
sent, except it's repeated over and over. i'm posative
i'm sending it only once. i wrote a routine to record
the # of sends and the # received and it looks like this
(based on a timer). send/receive:

1/8
2/16
3/24
4/32

i've changed the # of bytes i send to 1,000, 500, 441,
etc and it ALWAYS shows up as 8,000 bytes. what the heck
is going on!?!?!?! this is driving me nuts.

also, i'm working on a single box using ip 127.0.0.1.
i've tried both socket object and tcpclient/tcplistener
objects with the same exact result.

thanks.
 
one thing to keep in mind is that i've written multiple
tcp apps in .net 2002 and 2003, and haven't seen this
problem before.

<snip>

Could you write a short but complete program which demonstrates the
problem? It sounds very odd indeed.
 
is the buffer you are using for the receive 8000 bytes?

Do you have some sample code you can post?

What is the int value returned from the receive or EndReceiveFrom?

Joe Feser
 
is the buffer you are using for the receive 8000 bytes?

Do you have some sample code you can post?

What is the int value returned from the receive or EndReceiveFrom?

Joe Feser
 
Back
Top