Wolfringo Wolfringo
Wolfringo Wolfringo
Wolfringo (c) 2020 TehGM
DocFX, DiscordFX theme.
Search Results for

    Class SocketClientExtensions

    Extension methods for ISocketClient.

    Inheritance
    System.Object
    SocketClientExtensions
    Namespace: TehGM.Wolfringo.Socket
    Assembly: Wolfringo.Core.dll
    Syntax
    public static class SocketClientExtensions

    Methods

    | Improve this Doc View Source

    SendAsync(ISocketClient, String, JToken, IEnumerable<Byte[]>, CancellationToken)

    Sends (emits) event to the server.

    Declaration
    public static Task<uint> SendAsync(this ISocketClient client, string eventName, JToken data, IEnumerable<byte[]> binaryMessages, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    ISocketClient client

    Socket client to send event from.

    System.String eventName

    Event name to send.

    Newtonsoft.Json.Linq.JToken data

    Json data to pack with eventName.

    System.Collections.Generic.IEnumerable<System.Byte[]> binaryMessages

    Collection of binary messages to send. data should be pre-populated with placeholders.

    System.Threading.CancellationToken cancellationToken

    Token which can be used to abort sending.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.UInt32>

    ID of the sent message.