Class CommonNetworkParametersExtensions
Inherited Members
Namespace: Unity.Networking.Transport
Syntax
public static class CommonNetworkParametersExtensions
Methods
GetDataStreamParameters(ref NetworkSettings)
Gets the NetworkDataStreamParameter
Declaration
public static NetworkDataStreamParameter GetDataStreamParameters(this ref NetworkSettings settings)
Parameters
Type | Name | Description |
---|---|---|
NetworkSettings | settings | NetworkSettings to get parameters from. |
Returns
Type | Description |
---|---|
NetworkDataStreamParameter | Returns the NetworkDataStreamParameter values for the NetworkSettings |
GetNetworkConfigParameters(ref NetworkSettings)
Gets the NetworkConfigParameter
Declaration
public static NetworkConfigParameter GetNetworkConfigParameters(this ref NetworkSettings settings)
Parameters
Type | Name | Description |
---|---|---|
NetworkSettings | settings | NetworkSettings to get parameters from. |
Returns
Type | Description |
---|---|
NetworkConfigParameter | Returns the NetworkConfigParameter values for the NetworkSettings |
WithDataStreamParameters(ref NetworkSettings, Int32)
Sets the NetworkDataStreamParameter values for the NetworkSettings
Declaration
[Obsolete("In Unity Transport 2.0, the data stream size will always be dynamically-sized and this API will be removed.")]
public static ref NetworkSettings WithDataStreamParameters(this ref NetworkSettings settings, int size = 0)
Parameters
Type | Name | Description |
---|---|---|
NetworkSettings | settings | |
Int32 | size | size |
Returns
Type | Description |
---|---|
NetworkSettings |
WithNetworkConfigParameters(ref NetworkSettings, Int32, Int32, Int32, Int32, Int32, Int32)
Sets the NetworkConfigParameter values for the NetworkSettings
Declaration
public static ref NetworkSettings WithNetworkConfigParameters(this ref NetworkSettings settings, int connectTimeoutMS = 1000, int maxConnectAttempts = 60, int disconnectTimeoutMS = 30000, int heartbeatTimeoutMS = 500, int maxFrameTimeMS = 0, int fixedFrameTimeMS = 0)
Parameters
Type | Name | Description |
---|---|---|
NetworkSettings | settings | NetworkSettings to modify. |
Int32 | connectTimeoutMS | connectTimeoutMS |
Int32 | maxConnectAttempts | maxConnectAttempts |
Int32 | disconnectTimeoutMS | disconnectTimeoutMS |
Int32 | heartbeatTimeoutMS | heartbeatTimeoutMS |
Int32 | maxFrameTimeMS | maxFrameTimeMS |
Int32 | fixedFrameTimeMS | fixedFrameTimeMS |
Returns
Type | Description |
---|---|
NetworkSettings | Modified NetworkSettings. |