Click or drag to resize

TCPConnection Class

A TCP connection to a Brainboxes Device
Inheritance Hierarchy
SystemObject
  Brainboxes.IOConnection
    Brainboxes.IOTCPConnection

Namespace: Brainboxes.IO
Assembly: Brainboxes.IO (in Brainboxes.IO.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public class TCPConnection : Connection

The TCPConnection type exposes the following members.

Constructors
 NameDescription
Public methodTCPConnection Create a TCP Connection to a Brainboxes EDDevice Use Brainboxes Boost.IO to find out the IP address of the Brainboxes EDDevice on your network
Top
Properties
 NameDescription
Public propertyConnectionTimeout Connection timeout for the socket in milliseconds, default 20 seconds This is approximately the same as the TCPClient connection timeout, however unlike the TCPClient, this connection timeout can be altered
Public propertyIsAvailable Whether this connection to a Brainboxes Device is available, e.g. online or offline​. In case of network TCP connection: this is if the device is pingable on the network. In case of serial connection: this is if the device COM port is listed on the system and not open by another process.
(Inherited from Connection)
Public propertyIsConnected Whether this connection instance to a Brainboxes Device is active
(Inherited from Connection)
Public propertyPort The TCP port of the Connection to the Brainboxes Device e.g. "9500"
Public propertyStream The Connections underlying stream class
(Inherited from Connection)
Public propertyTimeout The connection and stream timeouts (for both stream read and stream write), measured in millseconds
(Overrides ConnectionTimeout)
Top
Methods
 NameDescription
Public methodConnect Connect to the ED Device
(Inherited from Connection)
Public methodDisconnect Disconnect from the ED Device
(Inherited from Connection)
Public methodDispose Dispose of this Brainboxes device
(Inherited from Connection)
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodToString ToString
(Overrides ConnectionToString)
Top
Events
 NameDescription
Public eventConnectionStatusChangedEvent When the status of the connection changes this event is raised e.g. when IsConnected changes from false to true or when IsAvailable changes: * for example for a TCPConnection if the IP address is goes from on-line to off-line * or for example for a SerialConnection when the COM name is no longer present or in use by another program
(Inherited from Connection)
Top
Fields
 NameDescription
Public fieldStatic memberDEFAULT_ASCII_PORT The default port for ASCII
Public fieldStatic memberDEFAULT_MODBUSTCP_PORT The default port for Modbus TCP
Public fieldIP The IP address of the Connection to the Brainboxes Device e.g. "192.168.0.1"
Top
See Also