TcpComm
Returns a current copy of the server's internal list of sessions as a List(Of SessionCommunications). It is possible that some sessions may be inactive,
or disconnected. Care should be taken to check the session.isRunning before using one,
because inactive or disconnected sessions may be overwritten by new connections at any moment.
List(Of SessionCommunications)
Gets the session object associated with the sessionId. Returns Nothing for sessions where session.isRunning = False.
A TcpComm.Server.SessionCommunications object
Gets the first session object associated with the MachineID. Returns Nothing for sessions where session.isRunning = False.
A TcpComm.Server.SessionCommunications object
This is a convienience function that handles the work of converting the text you would like to send to a byte array.
Passes back the return value and errMsg of SendBytes(). Returns True on success and False on falure. Check the errMsg
string for send failure explanations.
Returns the size of the selected session's sendqueue. Returns -1 if the session is nothing, or session.isRunning = False.
CAUTION: Calling this function too often will result in decreased performance, and failing to call it at all may result
in an out of memory error. You can continue to add messages to a session's send queue for as long as the session is active
(isRunning = True), but that doesn't mean they are being sent as fast as you are adding them to the queue (or at all, for that matter).
An Int32
Starting a new client requires a callback sub, and optional reconnection cryteria.
Clients started whith ReconnectOnDisconnection = True will continue to attempt to reconnect for the time specifyed in ReconnectionDurationSeconds.
The number of seconds to attempt to reconnect to the server in the event that connection is lost.
Closes the TCP connection.
Prevents all system messages from being passed to your callback
(including the disconnected notification) and retruns control quickly while the client shuts
down in the background.
Returns the size of the sendqueue. Returns -1 if isRunning = False.
CAUTION: Calling this function too often will result in decreased performance, and failing to call it at all may result
in an out of memory error. You can continue to add messages to the send queue for as long as the connection is active
(isRunning = True), but that doesn't mean they are being sent as fast as you are adding them to the queue (or at all, for that matter).
An Int32
This is a convienience function that handles the work of converting the text you would like to send to a byte array.
Passes back the return value and errMsg of SendBytes(). Returns True on success and False on falure. Check the errMsg
string for send failure explanations.
Returns the cached ResourceManager instance used by this class.
Overrides the current thread's CurrentUICulture property for all
resource lookups using this strongly typed resource class.
A strongly-typed resource class, for looking up localized strings, etc.
Put this at the top of your callback, in a if statement. If it eveluates to true, then call return (the bytes were handled by this method). This method will
eveluate all incoming packets within the channelrange, and assemble any large arrays sent. When one is complete, it will call the callback itself for you,
and hand you the completed large array.
Ie:
If lat.HandleIncomingBytes(bytes, dataChannel) then Return
The bytes supplied by your callback.
The channel supplied by your callback.
The sessionId supplied by your callback - obviously just for servers.
This byte array should contain two elements. The first is the lowest chanel this function should evaluate, the second is the highest.
Leave it blank to eveluate all valid channels. However, not specifying a channelRange may slow down comunications.
A boolean value indication weather or not this incoming packet was handled by this function.