Search Results for

    Show / Hide Table of Contents

    Interface INetworkServer

    The network server interface.

    Namespace: Evergine.Networking.Connection
    Assembly: Evergine.Networking.dll
    Syntax
    public interface INetworkServer

    Methods

    CreateMessage(MessageType)

    Creates a new outgoing message.

    Declaration
    OutgoingMessage CreateMessage(MessageType type = MessageType.Data)
    Parameters
    Type Name Description
    MessageType type

    The type of the message.

    Returns
    Type Description
    OutgoingMessage

    The newly created outgoing message.

    Send(IncomingMessage, DeliveryMethod)

    Sends the specified incoming message to other clients.

    Declaration
    void Send(IncomingMessage message, DeliveryMethod deliveryMethod)
    Parameters
    Type Name Description
    IncomingMessage message

    The message.

    DeliveryMethod deliveryMethod

    The delivery method.

    Send(IncomingMessage, DeliveryMethod, NetworkEndpoint)

    Sends the specified incoming message to the specified client.

    Declaration
    void Send(IncomingMessage message, DeliveryMethod deliveryMethod, NetworkEndpoint destinationClient)
    Parameters
    Type Name Description
    IncomingMessage message

    The message.

    DeliveryMethod deliveryMethod

    The delivery method.

    NetworkEndpoint destinationClient

    The destination client.

    Send(IncomingMessage, DeliveryMethod, IEnumerable<NetworkEndpoint>)

    Sends the specified incoming message to the designated clients.

    Declaration
    void Send(IncomingMessage message, DeliveryMethod deliveryMethod, IEnumerable<NetworkEndpoint> destinationClients)
    Parameters
    Type Name Description
    IncomingMessage message

    The message.

    DeliveryMethod deliveryMethod

    The delivery method.

    IEnumerable<NetworkEndpoint> destinationClients

    The destination clients.

    Send(OutgoingMessage, DeliveryMethod)

    Sends the specified outgoing message to all clients.

    Declaration
    void Send(OutgoingMessage message, DeliveryMethod deliveryMethod)
    Parameters
    Type Name Description
    OutgoingMessage message

    The message.

    DeliveryMethod deliveryMethod

    The delivery method.

    Send(OutgoingMessage, DeliveryMethod, NetworkEndpoint)

    Sends the specified outgoing message to the specified client.

    Declaration
    void Send(OutgoingMessage message, DeliveryMethod deliveryMethod, NetworkEndpoint destinationClient)
    Parameters
    Type Name Description
    OutgoingMessage message

    The message.

    DeliveryMethod deliveryMethod

    The delivery method.

    NetworkEndpoint destinationClient

    The destination client.

    Send(OutgoingMessage, DeliveryMethod, IEnumerable<NetworkEndpoint>)

    Sends the specified outgoing message to the specified clients.

    Declaration
    void Send(OutgoingMessage message, DeliveryMethod deliveryMethod, IEnumerable<NetworkEndpoint> destinationClients)
    Parameters
    Type Name Description
    OutgoingMessage message

    The message.

    DeliveryMethod deliveryMethod

    The delivery method.

    IEnumerable<NetworkEndpoint> destinationClients

    The destination clients.

    ShutdownAsync()

    Shuts down the server.

    Declaration
    Task ShutdownAsync()
    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    StartAsync()

    Starts the server.

    Declaration
    Task StartAsync()
    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Events

    ClientConnected

    Occurs when the server receives a new client connection.

    Declaration
    event EventHandler<ClientConnectedEventArgs> ClientConnected
    Event Type
    Type Description
    EventHandler<ClientConnectedEventArgs>
    Remarks

    The incoming message represents the hail message sent by the client.

    ClientConnecting

    Occurs when the server receives a new client connection request.

    Declaration
    event EventHandler<ClientConnectingEventArgs> ClientConnecting
    Event Type
    Type Description
    EventHandler<ClientConnectingEventArgs>

    ClientDisconnected

    Occurs when the server loses the connection with a client.

    Declaration
    event EventHandler<ClientDisconnectedEventArgs> ClientDisconnected
    Event Type
    Type Description
    EventHandler<ClientDisconnectedEventArgs>

    MessageReceived

    Occurs when a message is received by the server.

    Declaration
    event EventHandler<MessageReceivedEventArgs> MessageReceived
    Event Type
    Type Description
    EventHandler<MessageReceivedEventArgs>

    Extension Methods

    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In this article
    Back to top
    Generated by DocFX