Server Functions (By Port)

  • getClientDataByPort(ByVal PORT As Integer, ByRef buffer As Byte(), ByRef dataLength As Integer) As Boolean
  • isClientConnectedByPort(ByVal PORT As Integer) As Boolean
  • sendDataToClientByPort(ByVal PORT As Integer, ByRef buffer As Byte(), ByVal length As Byte)

Server Functions (By Unique ID)

  • getClientDataByID(ByVal ID As Integer, ByRef buffer As Byte(), ByRef dataLength As Integer) As Boolean
  • isClientConnectedByID(ByVal ID As Integer) As Boolean
  • sendDataToClientByID(ByVal ID As Integer, ByRef buffer As Byte(), ByVal length As Byte) As Boolean

 

getClientDataByPort(ByVal PORT As Integer, ByRef buffer As Byte(), ByRef dataLength As Integer) As Boolean

This function returns true if the client connected to port PORT has sent data to the server and that data is awaiting to be handled. A byte array is passed to this function so that if this function returns true, the passed buffer will contain the data. An integer is also passed by reference (dataLength) so that once the function has been executed, that integer will be the size of the data sitting in the byte array (buffer).

 

isClientConnectedByPort(ByVal PORT As Integer) As Boolean

This function returns true if there is a client connected to port PORT else returns false.

 

sendDataToClientByPort(ByVal PORT As Integer, ByRef buffer As Byte(), ByVal length As Byte) As Boolean

This function sends the data found in buffer to the client connected to port PORT where the length of data to send is the byte value length. True is returned upon sending and false if there is no client connected to that port.

 

getClientDataByID(ByVal ID As Integer, ByRef buffer As Byte(), ByRef dataLength As Integer) As Boolean

This function returns true if the client whose unique id is ID has sent data to the server and that data is awaiting to be handled. A byte array is passed to this function so that if this function returns true, the passed buffer will contain the data. An integer is also passed by reference (dataLength) so that once the function has been executed, that integer will be the size of the data sitting in the byte array (buffer).

 

isClientConnectedByID(ByVal ID As Integer) As Boolean

This function returns true if there is a client connected whose unique id is ID, else returns false.

 

sendDataToClientByID(ByVal ID As Integer, ByRef buffer As Byte(), ByVal length As Byte) As Boolean

This function sends the data found in buffer to the client whose unique id is ID where the length of data to send is the byte value length. True is returned upon sending and false if there is no client with the id ID.