Hi, I am trying to use
private TcpClient tcpClient;
in a class and every time when I send a command like LIST
, RETR
, STOR
, I used to lock the TCPClient for that particular time of execution of commands and getting response.
Now when I send the other command in between the one is executing, It isn't able to lock that tcpclient instance again.
How should I send the other command when one is executing. For all commands I need to lock the TCPClient, that I can't change.