Last active
August 22, 2023 05:26
-
-
Save pingkunga/bdfb50c5eede67269fa258e1d65e2aa0 to your computer and use it in GitHub Desktop.
TCP_JSON#01
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
TcpClient clientSocket; | |
clientSocket = new TcpClient(); | |
try | |
{ | |
clientSocket.Connect(host, port); | |
} | |
catch (SocketException socketEx) | |
{ | |
throw new DSException("Connect-001", "Socket Exception", EXCEPTION_LEVEL.System, socketEx); | |
} | |
catch (ObjectDisposedException disposedException) | |
{ | |
throw new DSException("Connect-001", "Object Disposed Exception", EXCEPTION_LEVEL.System, disposedException); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment