need help! : SetSocketOption problem!

  • Thread starter Thread starter Tomer
  • Start date Start date
T

Tomer

The command:

socket.SetSocketOption(SocketOptionLevel.Socket,
SocketOptionName.ReceiveTimeout, n);

is not supported by the os, but I still need to control the receive timeout.
what can I do?



Tomer.
 
What are you trying to achieve. Assuming the option were supported, how were
you going to use it?
 
I need to change the waiting time for the server application.
I wrote an application that sends data to a server, when it finishes it
waits for a respones from the server.
In case the server had some problem(like getting stuck) the PPC won't get
what he waits for, and the user of the PPC will have to wait for a long
time.

So, what I wanted to do is , in some parts of the code I will change the
timeout as needed. So that if theres a problem the user won't have to wait
longer than it necessary.

Tomer.
 
Instead of setting timeout you should use asynchronous socket calls -
Begin/EndSend and Begin/EndReceive. Also set an internal timer that would
abort Send/Receive on timeout
 
Back
Top