IConnector Interface |
Namespace: VirtualRadar.Interface.Network
The IConnector type exposes the following members.
Name | Description | |
---|---|---|
Authentication |
Gets or sets the authentication to use with the connection. If this is set
then the other side must implement the same authentication.
| |
Connection |
Gets the first (or only) connection established by the connector.
| |
ConnectionStatus |
Gets the connection status. This only reflects the status of the connector -
individual connections being maintained by the connector have their own status.
| |
CountExceptions |
Gets the number of exceptions ever encountered by the connector.
| |
Created |
Gets the date and time, at UTC, that the connector was first created.
| |
EstablishingConnections |
Gets a value that EstablishConnection has been called without a subsequent
call to CloseConnection.
| |
HasConnection |
Gets a value indicating that the connector has established a connection with at
least one end point.
| |
Intent |
Gets a description of the intended use of the connector. Only used for diagnostics.
| |
IsPassive |
Gets or sets a value indicating whether the connector waits for other things to
connect to it or it actively connects to other things.
| |
IsSingleConnection |
Gets or sets a value indicating whether the connector supports multiple connections
or a single connection.
| |
LastException |
Gets the last exception encountered by the connector.
| |
Name |
Gets or sets the name of the connector.
| |
StaleMessageTimeout |
Gets the maximum age (in milliseconds) that a message can sit in the transmit queue
before it is considered stale and discarded.
|
Name | Description | |
---|---|---|
CloseConnection |
Tells the connector to close all connections. This blocks until all connections
have been shut down.
| |
Dispose | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (Inherited from IDisposable.) | |
EstablishConnection |
Tells the connector to establish a connection. This is a non-blocking call, the
function will return immediately and establish the connection in the background.
| |
GetActivityHistory |
Returns an array of the last so-many activities performed by the connector or any of its
connections. Exactly how many is undefined. This always returns the most recent set of activities.
| |
GetConnections |
Returns an array of established connections made by the connector.
| |
GetExceptionHistory |
Returns an array of the last so-many exceptions encountered by the connector. Exactly
how many is undefined, but it can be more than one and will never exceed CountExceptions.
Always returns the most recent set of exceptions.
| |
GetFirstConnection |
Returns the first established connection or null if there are no connections.
| |
Read(Byte, ConnectionReadDelegate) |
Reads the next chunk from the first (or only) connection.
| |
Read(Byte, Int32, Int32, ConnectionReadDelegate) |
Reads the next chunk from the first (or only) connection.
| |
RestartConnection |
Closes the connection and then establishes the connection.
| |
Write(Byte, Int32) |
Writes the content of the buffer to every connection.
| |
Write(Byte, Int32, Int32, Int32) |
Writes the content of the buffer to every connection.
|
Name | Description | |
---|---|---|
ActivityRecorded |
Raised when an activity is recorded by the connector.
| |
AddingConnection |
Raised when a connection has been established. The connection will not yet be in the list
of established connections, writes on the connector will not go to this connection. Usually
raised from a background thread.
| |
ConnectionClosed |
Raised when a connection has been permanently closed. This will usually be raised from
a background thread.
| |
ConnectionEstablished |
Raised when a connection has been established. This will usually be raised from
a background thread. The connection will be in the list of established connections when
this is raised.
| |
ConnectionStateChanged |
Raised when a connection's connection state has changed. This will usually be raised from
a background thread. Sender will either be an IConnection or this
IConnector.
| |
ExceptionCaught |
Raised when an exception is caught on the background thread. The background thread should not
pass ThreadAbortException through this.
(Inherited from IBackgroundThreadExceptionCatcher.) |
Connectors do the work of establishing a link with another machine or a piece of hardware. The intention is that the connector is created by another object that then either sends or receives a stream of bytes over the connection.
Connectors and their child connections have the capacity to generate a LOT of exceptions under the right conditions. All exceptions are caught and routed through the background thread exception event. The last exception raised is also recorded.
You cannot instantiate an IConnector. There are other interfaces that are based on this that you can instantiate.