Dear All,
I am new in this forum and also relatively new to .Net. I need to create an application which needs to be able to act as a network server and provide data and messages to a variety of clients including IMAP email clients.
I am using Visual C# and .Net version 2.0.
The .NET socket interface looks somewhat easy but it there seems little control of the details. I can not design both sides of the...
User Profile
Collapse
-
Thanks - and this worked.
Obviously the RECEIVE method does not block until all is received ... no mention of this anywhere in the documentation though.
Concerning the Backlog entry - there is no overload which doesn't have this parameter, you'll have to supply it on the Accept() method.
Peter -
Thanks for the reply.
Below is the relevant code snippet. It is just a test sample but works okay to connect and get text sent, except for the strange limitation. If I send text of 12 KBytes, the programs says 7300 bytes received.
Certainly TCP will send several packets - but the .NET documentation does not say if the Send() member function does any collation of packages or what. On MFC one had to use an CFile archive...Leave a comment:
-
TCP Socket - text size limit
I am trying to send strings over a simple TCP Socket connection but it will not send more than about 7 kBytes.
I am not using the TCPListener / TCPClient but the Socket class, the socket parameters being NetworkFamily.I nternetwork, Protocol.Tcp, and Stream as a socket type.
To send data, I am using the Socket.Send() member.
The server accepts the connection synchronously and creates a new socket and it all works perfectly...
No activity results to display
Show More
Leave a comment: