G
Guest
Hi,
I'm writing some code that talks to a POP3 server with a TcpClient. I can send and receive using a NetworkStream, but when I send my message, then try to recieve, no response has returned. I'm assuming that this is because the server hasn't had the chance to respond before the recieve buffer is read. If this is the case, then how do I tell my code to wait around before checking the stream?
If I just have a do{}until loop constantly checking the stream will this eat up the processor?
Is there a simple way of telling the code to wait for a few ticks?
Is there some way I can check the TcpClient or NetworkStream to see when to retrieve my data?
Any help?
Cheers,
Burns
I'm writing some code that talks to a POP3 server with a TcpClient. I can send and receive using a NetworkStream, but when I send my message, then try to recieve, no response has returned. I'm assuming that this is because the server hasn't had the chance to respond before the recieve buffer is read. If this is the case, then how do I tell my code to wait around before checking the stream?
If I just have a do{}until loop constantly checking the stream will this eat up the processor?
Is there a simple way of telling the code to wait for a few ticks?
Is there some way I can check the TcpClient or NetworkStream to see when to retrieve my data?
Any help?
Cheers,
Burns