docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method Bind

    Bind(NetworkEndpoint)

    Bind the driver to an endpoint. This endpoint would normally be a local IP address and port which the driver will use for its communications. Binding to a wildcard address (AnyIpv4 or AnyIpv6) will result in the driver using any local address for its communications, and binding to port 0 will result in the driver using an ephemeral free port chosen by the OS.

    Declaration
    public int Bind(NetworkEndpoint endpoint)
    Parameters
    Type Name Description
    NetworkEndpoint endpoint

    Endpoint to bind to.

    Returns
    Type Description
    int

    0 on success, negative error code on error.

    Exceptions
    Type Condition
    InvalidOperationException

    If the driver is not created properly, if it's already bound, or if there are already connections made to the driver (although that shouldn't be possible). Note that these exceptions are only thrown if safety checks are enabled (i.e. in the editor).

    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