Socket programming problem
-
I am writing a program that accesses a CICS system using a socket. The problem I am having is that the server is slow and sends either a maximum of 393 bytes total (size of record) or a Chr(13) showing that the output is complete. My question is that whether it is better to read byte for byte from the server (since it is slow) or set the receive window size in the tcpclient. The second solution has a limitation since I am waiting for a particular character in the output stream to show that my output has ended. Thanks,
-
I am writing a program that accesses a CICS system using a socket. The problem I am having is that the server is slow and sends either a maximum of 393 bytes total (size of record) or a Chr(13) showing that the output is complete. My question is that whether it is better to read byte for byte from the server (since it is slow) or set the receive window size in the tcpclient. The second solution has a limitation since I am waiting for a particular character in the output stream to show that my output has ended. Thanks,
There is an Example in the MSDN help on receiving Data from a Socket. However, it uses the TCPClient Class instead of Socket, I am sure you can modify this. Do a search on "Chat" and it should find an example of a Chat application. In that example, it will show how to receive data Asynchronously.