Class TransportArgs
Provides data for transport events such as connection, disconnection, and data reception.
public class TransportArgs : EventArgs
- Inheritance
-
TransportArgs
- Inherited Members
Constructors
TransportArgs()
Initializes a new instance of the TransportArgs class.
public TransportArgs()
TransportArgs(IPProtoEndPoint)
Initializes a new instance of the TransportArgs class with the specified endpoint.
public TransportArgs(IPProtoEndPoint endPoint)
Parameters
endPointIPProtoEndPointThe endpoint responsible for this event.
TransportArgs(IPProtoEndPoint, VersatileBuffer)
Initializes a new instance of the TransportArgs class with the specified endpoint and packet.
public TransportArgs(IPProtoEndPoint endPoint, VersatileBuffer packet)
Parameters
endPointIPProtoEndPointThe endpoint responsible for this event.
packetVersatileBufferThe packet buffer associated with this event.
Properties
ActualLocalEndPoint
Gets or sets the actual local endpoint that received this event.
public IPEndPoint ActualLocalEndPoint { get; set; }
Property Value
Remarks
The difference between LocalEndPoint and ActualLocalEndPoint is that ActualLocalEndPoint contains the real local endpoint that received the packet from a UDP socket bound to Any or IPv6Any. In other cases, both properties are identical.
ConnectEventHandler
Gets or sets the event handler for connection established events.
public EventHandler<TransportArgs> ConnectEventHandler { get; set; }
Property Value
DisconnectEventHandler
Gets or sets the event handler for disconnection events.
public EventHandler<TransportArgs> DisconnectEventHandler { get; set; }
Property Value
EndPoint
Gets or sets the key endpoint responsible for this event.
public IPProtoEndPoint EndPoint { get; set; }
Property Value
LocalEndPoint
Gets or sets the local endpoint that received this event.
public IPEndPoint LocalEndPoint { get; set; }
Property Value
Packet
Gets or sets the packet buffer associated with this event.
public VersatileBuffer Packet { get; set; }
Property Value
ReceiveEventHandler
Gets or sets the event handler for data receive events.
public EventHandler<TransportArgs> ReceiveEventHandler { get; set; }
Property Value
RemoteEndPoint
Gets or sets the remote endpoint responsible for this event.
public IPEndPoint RemoteEndPoint { get; set; }
Property Value
SocketError
Gets or sets the socket error code.
public SocketError SocketError { get; set; }
Property Value
Remarks
This property is meaningful only for disconnection events.
UserContext
Gets or sets a user-defined context object associated with the event.
public object UserContext { get; set; }