docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method BeginSend

    BeginSend(NetworkConnection, out DataStreamWriter, int)

    Begin sending data on the given connection (default pipeline).

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

    Connection to send the data to.

    DataStreamWriter writer

    DataStreamWriter the data can be written to.

    int requiredPayloadSize

    Size that the returned DataStreamWriter must support. The method will return an error if that payload size is not supported by the pipeline. Defaults to 0, which means the DataStreamWriter will be as large as it can be.

    Returns
    Type Description
    int

    0 on success, a negative value on error.

    BeginSend(NetworkPipeline, NetworkConnection, out DataStreamWriter, int)

    Begin sending data on the given connection and pipeline.

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

    Pipeline to send the data on.

    NetworkConnection connection

    Connection to send the data to.

    DataStreamWriter writer

    DataStreamWriter the data can be written to.

    int requiredPayloadSize

    Size that the returned DataStreamWriter must support. The method will return an error if that payload size is not supported by the pipeline. Defaults to 0, which means the DataStreamWriter will be as large as it can be.

    Returns
    Type Description
    int

    0 on success, a negative error code on error.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023