Created
August 22, 2023 06:33
-
-
Save pingkunga/a1df212de28f56924f82fd3ab71fb817 to your computer and use it in GitHub Desktop.
TCP_JSON#03
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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