Search Results for

    Show / Hide Table of Contents

    Class Transport

    Inheritance
    Object
    Transport
    MultiplexTransport
    RufflesTransport
    TelepathyTransport
    Namespace: FNNLib.Transports
    Assembly: FNNLib.dll
    Syntax
    public abstract class Transport : MonoBehaviour

    Properties

    | Improve this Doc View Source

    clientConnected

    Whether the client is connected to the server.

    Declaration
    public abstract bool clientConnected { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    serverRunning

    Whether the server is running.

    Declaration
    public abstract bool serverRunning { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    supported

    Whether or not the transport is supported on this target platform.

    Declaration
    public abstract bool supported { get; }
    Property Value
    Type Description
    Boolean

    Methods

    | Improve this Doc View Source

    ClientConnect(String)

    Connect the client to the server.

    Declaration
    public abstract void ClientConnect(string hostname)
    Parameters
    Type Name Description
    String hostname

    The server's hostname

    | Improve this Doc View Source

    ClientDisconnect()

    Disconnect the client from the server.

    Declaration
    public abstract void ClientDisconnect()
    | Improve this Doc View Source

    ClientSend(ArraySegment<Byte>, Int32)

    Send data to the server.

    Declaration
    public abstract bool ClientSend(ArraySegment<byte> data, int channel = 0)
    Parameters
    Type Name Description
    ArraySegment<Byte> data

    The data to send.

    Int32 channel

    The channel to send the data down. Default = 0. Ignored on Transports that don't support channelling.

    Returns
    Type Description
    Boolean

    Whether the data was sent/queued to send.

    | Improve this Doc View Source

    GetMessage(out UInt64, out ArraySegment<Byte>, out Int32)

    Declaration
    public abstract NetworkEventType GetMessage(out ulong clientID, out ArraySegment<byte> data, out int channel)
    Parameters
    Type Name Description
    UInt64 clientID
    ArraySegment<Byte> data
    Int32 channel
    Returns
    Type Description
    NetworkEventType
    | Improve this Doc View Source

    ServerDisconnect(UInt64)

    Force disconnect client.

    Declaration
    public abstract void ServerDisconnect(ulong clientID)
    Parameters
    Type Name Description
    UInt64 clientID

    Client to force disconnect.

    Remarks

    You should use the higher level NetworkServer disconnect system, as that allows disconnection reasons. This is a last resort which is used by NetworkServer disconnect if the client doesn't honour it.

    | Improve this Doc View Source

    ServerSend(List<UInt64>, ArraySegment<Byte>, Int32, UInt64)

    Send data to clients.

    Declaration
    public abstract bool ServerSend(List<ulong> clients, ArraySegment<byte> data, int channel, ulong excludedClient = 0UL)
    Parameters
    Type Name Description
    List<UInt64> clients

    The clients to send to.

    ArraySegment<Byte> data

    The data to send.

    Int32 channel

    The channel to send the data down. Ignored on Transports that don't support channelling.

    UInt64 excludedClient
    Returns
    Type Description
    Boolean

    Whether the data could be sent.

    | Improve this Doc View Source

    ServerShutdown()

    Stop the server.

    Declaration
    public abstract void ServerShutdown()
    | Improve this Doc View Source

    ServerStart()

    Start the server.

    Declaration
    public abstract void ServerStart()
    | Improve this Doc View Source

    Shutdown()

    Shutdown both client and server.

    Declaration
    public abstract void Shutdown()
    • Improve this Doc
    • View Source
    In This Article
    Back to top (C) 2020 Reece Mackie. Released under the MIT License.