Search Results for

    Show / Hide Table of Contents

    Struct NetworkConfig

    Low-level network configuration structure. Provides settings for the network driver and all internal components.

    Assembly: FlaxEngine.dll
    File: Engine/Networking/NetworkConfig.h
    Syntax
    public struct NetworkConfig

    Constructors

    DEPRECATED("Use NetworkDriver field instead")

    The network driver that will be used to create the peer. To allow two peers to connect, they must use the same host. [Deprecated in v1.3]

    Declaration
    public DEPRECATED("Use NetworkDriver field instead") NetworkDriverType NetworkDriverType
    Parameters
    "Use NetworkDriver field instead" NetworkConfig_DEPRECATED__Use_NetworkDriver_field_instead__

    NetworkConfig(const NetworkConfig& other)

    Declaration
    public NetworkConfig(const NetworkConfig& other) = default
    Parameters
    NetworkConfig other

    NetworkConfig(NetworkConfig&& other)

    Declaration
    public NetworkConfig(NetworkConfig&& other) = default
    Parameters
    NetworkConfig other

    Fields

    Address

    Address used to connect to or listen at.

    Set it to "any" when you want to listen at all available addresses.

    Only IPv4 is supported.

    Declaration
    public String Address = String(TEXT("127.0.0.1"))
    Field Value
    String

    ConnectionsLimit

    The upper limit on how many peers can join when we're listening.

    Declaration
    public uint16 ConnectionsLimit = 32
    Field Value
    uint16

    MessagePoolSize

    The amount of pooled messages that can be used at once (receiving and sending!).

    Creating more messages than this limit will result in a crash! This should be tweaked manually to fit the needs (adjusting this value will increase/decrease memory usage)!

    Declaration
    public uint16 MessagePoolSize = 2048
    Field Value
    uint16

    MessageSize

    The size of a message buffer in bytes. Should be lower than the MTU (maximal transmission unit) - typically 1500 bytes.

    Declaration
    public uint16 MessageSize = 1500
    Field Value
    uint16

    NetworkDriver

    The network driver instance (implements INetworkDriver) that will be used to create and manage the peer, send and receive messages.

    Object is managed by the created network peer (will be deleted on peer shutdown).

    Declaration
    public ScriptingObject* NetworkDriver = nullptr
    Field Value
    ScriptingObject

    Port

    The port to connect to or listen at.

    Declaration
    public uint16 Port = 7777
    Field Value
    uint16

    Methods

    NetworkConfig()

    Declaration
    public PRAGMA_DISABLE_DEPRECATION_WARNINGS NetworkConfig()
    Returns
    PRAGMA_DISABLE_DEPRECATION_WARNINGS

    operator=(const NetworkConfig& other)

    Declaration
    public NetworkConfig operator=(const NetworkConfig& other) = default
    Parameters
    NetworkConfig other

    Returns
    NetworkConfig

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat