473,387 Members | 1,575 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

wrong # bytes on socket... for some reason always 8,000 bytes.

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.

thanks.

Nov 20 '05 #1
1 1416
On 2003-10-29, <an*******@discussions.microsoft.com> <an*******@discussions.microsoft.com> wrote:
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.

thanks.


Can you create a simple demo that recreates your problem? I've never
experienced or seen anything like what your describing...

--
Tom Shelton
MVP [Visual Basic]
Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Phillip Rhodes | last post by:
Hi all, I have a question I hope someone can help me with: I'm doing some communication over a socket, and have need to send and receive values of type double. I'm doing everything in terms of...
5
by: Russell Warren | last post by:
Does anyone know the scope of the socket.setdefaulttimeout call? Is it a cross-process/system setting or does it stay local in the application in which it is called? I've been testing this and...
11
by: Alfonso Morra | last post by:
Hi, I am at the end of my tether now - after spending several days trying to figure how to do this. I have finally written a simple "proof of concept" program to test serializing a structure...
4
by: chellappa | last post by:
Hi, This is program for socket program for server and client ... but data send from client and receive by server but i can t sen d message fro m server to client ... check i mistake .. i treed...
13
by: Shailesh Humbad | last post by:
Here is an advanced PHP question. Can anyone think of a way to detect the number of bytes written to output when a script is aborted? I am sending a large file to the client, and I want to record...
2
by: Ben | last post by:
I need to send data from a client to a server. In the server code I have: s = ServerSocket.Accept() If (s.Connected = False) Then MsgBox("Unable to connect", , "Server Error") Exit Sub End...
5
by: Jens | last post by:
Hello, I have been looking for some C-code which listens on a user-defined port for incoming data traffic. When data is received, the data is written to a file. I found some C-code (server)...
10
by: ThunderMusic | last post by:
Hi, I'm currently working with sockets. I accept connections using m_mySocket.Listen(BackLogCount); But when I want to stop listening, I shutdown all my clients and call m_mySocket.Close(), but it...
10
by: Guillermo_Lopez | last post by:
Hello All, I am using VBA in access to perform some calculations. There is a particular sumation that is wrong (barely). this code is withing a loop. TDist = TDist + TempDist Both TDist...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.