docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class WebSocketParameterExtensions

    Extensions for WebSocketParameter.

    Inheritance
    object
    WebSocketParameterExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Networking.Transport
    Assembly: Unity.Networking.Transport.dll
    Syntax
    public static class WebSocketParameterExtensions

    Methods

    GetWebSocketParameters(ref NetworkSettings)

    Gets the WebSocketParameter in the settings.

    Declaration
    public static WebSocketParameter GetWebSocketParameters(this ref NetworkSettings settings)
    Parameters
    Type Name Description
    NetworkSettings settings

    Settings to get parameters from.

    Returns
    Type Description
    WebSocketParameter

    Structure containing the WebSocket parameters.

    WithWebSocketParameters(ref NetworkSettings, FixedString128Bytes)

    Sets the NetworkConfigParameter in the settings.

    Declaration
    public static ref NetworkSettings WithWebSocketParameters(this ref NetworkSettings settings, FixedString128Bytes path = default)
    Parameters
    Type Name Description
    NetworkSettings settings

    Settings to modify.

    FixedString128Bytes path

    For WebSocket clients, the path to which WebSocket connections will be established. For WebSocket servers, the path on which new connections will be accepted. This setting is only meant to specify the actual path of the URL, not the entire URL (so if you want to connect to "127.0.0.1/some/path", you would specify "/some/path" here). Defaults to "/".

    Returns
    Type Description
    NetworkSettings

    Settings structure with modified values.

    In This Article
    Back to top
    Copyright © 2024 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)