problem receiving data from
-
i got assignment to write a program(Server) for port listner the client program is written in java. the client will send 69 byte that will be received by server and then processed. i have written a simple TCP listner progam in c# but it always read upto 52 bytes and next 17 bytes are always 0
-
i got assignment to write a program(Server) for port listner the client program is written in java. the client will send 69 byte that will be received by server and then processed. i have written a simple TCP listner progam in c# but it always read upto 52 bytes and next 17 bytes are always 0
So, cut out the relevant bits, and post them here (within <pre>...</pre> blocks) - otherwise we can't tell what your problem might be...
All those who believe in psycho kinesis, raise my hand.
-
i got assignment to write a program(Server) for port listner the client program is written in java. the client will send 69 byte that will be received by server and then processed. i have written a simple TCP listner progam in c# but it always read upto 52 bytes and next 17 bytes are always 0
Do you have TCP no delay set ? SetSocketOption(SocketOptionLevel.Tcp ,SocketOptionName.NoDelay, true); It should not help in your case except if you made a mistake in your read operation. TCP is a reliable stream delivery service that guarantees delivery of a data stream sent from one host to another without duplication or losing data but you may see your data cut in several packets. So, handling of re-assembly packets is necessary at the application level. When the system is not loaded it's okay, but you will see when a system is at 99% of CPU usage it's not the same. Hope it helps.... Just let me know
-
i got assignment to write a program(Server) for port listner the client program is written in java. the client will send 69 byte that will be received by server and then processed. i have written a simple TCP listner progam in c# but it always read upto 52 bytes and next 17 bytes are always 0
Is your recv or read function giving you back a total of 69 bytes? If so then the TCP part of the socket read is OK, and the "problem" lies on the server end in terms of what it's sending you. It's entirely possible that the server is in fact sending you 69 bytes, 52 of which are printable characters, and the remaining 17 padded out as 0's. A 0 is a perfectly valid byte value to send across a network.
¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow