Show / Hide Table of Contents

    Class SocketConnection_v772

    Class that represents a standard 7.72 client connection over a TCP socket.

    Inheritance
    System.Object
    SocketConnection_v772
    Implements
    ISocketConnection
    IConnection
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Fibula.Protocol.V772
    Assembly: Fibula.Protocol.V772.dll
    Syntax
    public class SocketConnection_v772 : ISocketConnection, IConnection

    Constructors

    | Improve this Doc View Source

    SocketConnection_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 Source

    IsOrphaned

    Gets a value indicating whether the connection is an orphan.

    Declaration
    public bool IsOrphaned { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    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 Source

    Close()

    Closes this connection.

    Declaration
    public void Close()
    | Improve this Doc View Source

    Read()

    Reads from this connection's stream.

    Declaration
    public void Read()
    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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 Source

    Closed

    Event fired when this connection has been closed.

    Declaration
    public event ConnectionClosedDelegate Closed
    Event Type
    Type Description
    ConnectionClosedDelegate
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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

    Implements

    ISocketConnection
    IConnection

    Extension Methods

    ObjectExtensions.YieldSingleItem<T>(T)
    ObjectExtensions.GetPropertyValue(Object, String)
    Validate.ThrowIfNull(Object, String)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2018-2020 | The Fibula Project
    Generated using DocFX | Jose L. Nuñez de Caceres et al.