Class SocketConnection_v772
Class that represents a standard 7.72 client connection over a TCP socket.
Inheritance
Inherited Members
Namespace: Fibula.Protocol.V772
Assembly: Fibula.Protocol.V772.dll
Syntax
public class SocketConnection_v772 : ISocketConnection, IConnection
Constructors
| Improve this Doc View SourceSocketConnection_v772(ILogger, Socket, IProtocol)
Initializes a new instance of the SocketConnection_v772 class.
Declaration
public SocketConnection_v772(ILogger logger, Socket socket, IProtocol protocol)
Parameters
Type | Name | Description |
---|---|---|
Serilog.ILogger | logger | A reference to the logger in use. |
System.Net.Sockets.Socket | socket | The socket that this connection is for. |
IProtocol | protocol | The protocol in use by this connection. |
Properties
| Improve this Doc View SourceIsOrphaned
Gets a value indicating whether the connection is an orphan.
Declaration
public bool IsOrphaned { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
SocketIp
Gets the Socket IP address of this connection, if it is open.
Declaration
public string SocketIp { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceClose()
Closes this connection.
Declaration
public void Close()
Read()
Reads from this connection's stream.
Declaration
public void Read()
Send(IEnumerable<IOutboundPacket>)
Prepares a INetworkMessage with the reponse packets supplied and sends it.
Declaration
public void Send(IEnumerable<IOutboundPacket> responsePackets)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<IOutboundPacket> | responsePackets | The packets that compose that response. |
SetupAuthenticationKey(UInt32[])
Sets up an Xtea key expected to be matched on subsequent messages.
Declaration
public void SetupAuthenticationKey(uint[] xteaKey)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32[] | xteaKey | The XTea key to use in this connection's communications. |
Events
| Improve this Doc View SourceClosed
Event fired when this connection has been closed.
Declaration
public event ConnectionClosedDelegate Closed
Event Type
Type | Description |
---|---|
ConnectionClosedDelegate |
PacketProcessed
Event fired right after this connection has proccessed an IIncomingPacket by any subscriber of the PacketReady event.
Declaration
public event ConnectionPacketProccessedDelegate PacketProcessed
Event Type
Type | Description |
---|---|
ConnectionPacketProccessedDelegate |
PacketReady
Event fired when a IIncomingPacket picked up by this connection is ready to be processed.
Declaration
public event ConnectionPacketReadyDelegate PacketReady
Event Type
Type | Description |
---|---|
ConnectionPacketReadyDelegate |