Method CreateServerNetworkDriver
CreateServerNetworkDriver<T>(T, int)
Helper method for creating server NetworkDriver given the specified netIf
The driver is configured with the internal defaults. See: GetNetworkServerSettings(int).
Declaration
public static NetworkDriverStore.NetworkDriverInstance CreateServerNetworkDriver<T>(T netIf, int playerCount = 0) where T : unmanaged, INetworkInterface
Parameters
| Type | Name | Description |
|---|---|---|
| T | netIf | the instance of a Unity.Networking.Transport.INetworkInterface to use to create the driver |
| int | playerCount | Amount of players the server should allocate receive and send queue for. The estimation is that each player will receive 4 packets. |
Returns
| Type | Description |
|---|---|
| NetworkDriverStore.NetworkDriverInstance |
Type Parameters
| Name | Description |
|---|---|
| T | the Unity.Networking.Transport.INetworkInterface type ot use |
CreateServerNetworkDriver<T>(T, NetworkSettings)
Helper method for creating server NetworkDriver given the specified INetworkInterface The driver is configured using the NetworkSettings.
Declaration
public static NetworkDriverStore.NetworkDriverInstance CreateServerNetworkDriver<T>(T netIf, NetworkSettings settings) where T : unmanaged, INetworkInterface
Parameters
| Type | Name | Description |
|---|---|---|
| T | netIf | |
| NetworkSettings | settings | A list of the parameters that describe the network configuration. |
Returns
| Type | Description |
|---|---|
| NetworkDriverStore.NetworkDriverInstance |
Type Parameters
| Name | Description |
|---|---|
| T | the Unity.Networking.Transport.INetworkInterface type ot use |