i working on a FTP client using Sockets, and i have a problem in detecting if Socket is still conected, before i will send a command to server using Socket.Send method. This code is not working:
// Conection with server ...... OK
// Server response ............. 220
// before sending a command (ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.NETDEVFX.v20.en/cpref10/html/P_System_Net_Sockets_Socket_Connected.htm)
= new byte;
clientSocket.Send(tmp, 1, 0);
clientSocket.Blocking = blockingState;
then i try with this (detect connection timeout):
return (loggedIn =
if i use and Receive method (after Send) all will be OK but why in MSDN docs its say that we can use Send or Receive? seems that Send is not working? it's may be a problem with server (not IIS)?.
after all this code Socket.Connected is still true, even if i stopped server (after establishing connection with it, and send some commands).