Skip to content

Instantly share code, notes, and snippets.

@pingkunga
Created August 22, 2023 06:33
Show Gist options
  • Save pingkunga/a1df212de28f56924f82fd3ab71fb817 to your computer and use it in GitHub Desktop.
Save pingkunga/a1df212de28f56924f82fd3ab71fb817 to your computer and use it in GitHub Desktop.
TCP_JSON#03
public abstract class AbstractBaseRequestHandler : IRTRequestHandler
{
protected int readTimeout;
protected int writeTimeout;
protected TcpClient clientSocket;
protected AbstractBaseRequestHandler()
{
this.readTimeout = 20000;
this.writeTimeout = 5000;
}
public void startClient(TcpClient clientSocket)
{
this.clientSocket = clientSocket;
Thread ctThread = new Thread(run);
ctThread.Start();
}
protected abstract void run();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment