Class TCPServer
- Namespace
- NominalSystems.External
- Assembly
- NominalSystems.External.dll
public class TCPServer : TCPBase
- Inheritance
-
TCPServer
- Inherited Members
Constructors
TCPServer()
Default constructor for the software
public TCPServer()
Fields
ServerPort
When Start() is called, the port used is saved here for the restart function. The value is less than zero if unconfigured or the close function has been called
public int ServerPort
Field Value
Methods
AcceptClient()
Checks if the server has a pending connection request from a client
public bool AcceptClient()
Returns
- bool
Returns true if a Client was connected
Close()
Closes the connection with the TCP Client
public bool Close()
Returns
- bool
Returns if the connection was successful closed
PollClientConnectionStatus(int)
Polls the connected Client to determine if the client is connected
public bool PollClientConnectionStatus(int timeout)
Parameters
timeout
int[ms] The specified timeout
Returns
- bool
Returns if the connection is still valid
Restart()
Restarts the TCP Server with the previously used port
public bool Restart()
Returns
- bool
Returns if the restart was possible
Start(int)
Starts the server and listens for incoming connections on the specified port
public void Start(int port)
Parameters
port
intThe specified port that clients will connect via