docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method BeginSend

    BeginSend(NetworkConnection, out DataStreamWriter, int)

    Acquires a DataStreamWriter for starting a asynchronous send.

    Declaration
    public int BeginSend(NetworkConnection id, out DataStreamWriter writer, int requiredPayloadSize = 0)
    Parameters
    Type Name Description
    NetworkConnection id

    The NetworkConnection id to write through

    DataStreamWriter writer

    A DataStreamWriter to write to

    int requiredPayloadSize

    If you require the payload to be of certain size

    Returns
    Type Description
    int

    Returns Success on a successful acquire. Otherwise returns an StatusCode indicating the error.

    Remarks

    Will throw a InvalidOperationException if the connection is in a Connecting state.

    BeginSend(NetworkPipeline, NetworkConnection, out DataStreamWriter, int)

    Acquires a DataStreamWriter for starting a asynchronous send.

    Declaration
    public int BeginSend(NetworkPipeline pipe, NetworkConnection id, out DataStreamWriter writer, int requiredPayloadSize = 0)
    Parameters
    Type Name Description
    NetworkPipeline pipe

    The NetworkPipeline to write through

    NetworkConnection id

    The NetworkConnection id to write through

    DataStreamWriter writer

    A DataStreamWriter to write to

    int requiredPayloadSize

    If you require the payload to be of certain size

    Returns
    Type Description
    int

    Returns Success on a successful acquire. Otherwise returns an StatusCode indicating the error.

    Remarks

    Will throw a InvalidOperationException if the connection is in a Connecting state.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)