Extends UNet's NetworkMigrationManager to work with punchthrough connections.
More...
Inherits NetworkMigrationManager.
|
virtual new bool | BecomeNewHost (int port) |
| Become the new host. Starts listening for punchthrough. More...
|
|
virtual bool | FindNewHost (out ExtraPeerInfoMessage newHostInfo, out bool youAreNewHost) |
| This is how the punchthrough client is added. More...
|
|
virtual new void | Initialize (NetworkClient directClient, MatchInfo newMatchInfo) |
| Initialize host migration. Registers the client to listen for ExtraPeerInfo messages. More...
|
|
virtual new bool | LostHostOnClient (NetworkConnection conn) |
| Disconnect both clients. Disable client owned objects. More...
|
|
virtual new void | LostHostOnHost () |
| Sets the client to null and calls base.LostHostOnClient() More...
|
|
new bool | ReconnectPlayerForConnection (NetworkConnection newConnection, GameObject oldPlayer, int oldConnectionId, short playerControllerId) |
| Called on new host when a client from the old host re-connects a player More...
|
|
virtual void | ReconnectToNewHost () |
|
virtual new void | SendPeerInfo () |
| Send ExtraPeerInfo messages to everyone. More...
|
|
virtual void | Start () |
| Grabs a reference to the NetworkManager. Calls Reset(). More...
|
|
|
override void | OnServerReconnectPlayer (NetworkConnection newConnection, GameObject oldPlayer, int oldConnectionId, short playerControllerId) |
| Called on new host when a client from the old host re-connects a player More...
|
|
override void | OnServerReconnectPlayer (NetworkConnection newConnection, GameObject oldPlayer, int oldConnectionId, short playerControllerId, NetworkReader extraMessageReader) |
| Called on new host when a client from the old host re-connects a player More...
|
|
Extends UNet's NetworkMigrationManager to work with punchthrough connections.
◆ BecomeNewHost()
virtual new bool BecomeNewHost |
( |
int |
port | ) |
|
|
virtual |
Become the new host. Starts listening for punchthrough.
- Parameters
-
- Returns
◆ FindNewHost()
This is how the punchthrough client is added.
- Parameters
-
Pick a new host. Override this to change how the new host is selected.
If you override this method DO NOT call the base method.
◆ Initialize()
virtual new void Initialize |
( |
NetworkClient |
directClient, |
|
|
MatchInfo |
newMatchInfo |
|
) |
| |
|
virtual |
Initialize host migration. Registers the client to listen for ExtraPeerInfo messages.
- Parameters
-
directClient | |
newMatchInfo | |
◆ LostHostOnClient()
virtual new bool LostHostOnClient |
( |
NetworkConnection |
conn | ) |
|
|
virtual |
Disconnect both clients. Disable client owned objects.
- Parameters
-
- Returns
◆ LostHostOnHost()
virtual new void LostHostOnHost |
( |
| ) |
|
|
virtual |
Sets the client to null and calls base.LostHostOnClient()
◆ OnServerReconnectPlayer() [1/2]
override void OnServerReconnectPlayer |
( |
NetworkConnection |
newConnection, |
|
|
GameObject |
oldPlayer, |
|
|
int |
oldConnectionId, |
|
|
short |
playerControllerId |
|
) |
| |
|
protected |
Called on new host when a client from the old host re-connects a player
- Parameters
-
newConnection | |
oldPlayer | |
oldConnectionId | |
playerControllerId | |
◆ OnServerReconnectPlayer() [2/2]
override void OnServerReconnectPlayer |
( |
NetworkConnection |
newConnection, |
|
|
GameObject |
oldPlayer, |
|
|
int |
oldConnectionId, |
|
|
short |
playerControllerId, |
|
|
NetworkReader |
extraMessageReader |
|
) |
| |
|
protected |
Called on new host when a client from the old host re-connects a player
- Parameters
-
newConnection | |
oldPlayer | |
oldConnectionId | |
playerControllerId | |
extraMessageReader | |
◆ ReconnectPlayerForConnection()
new bool ReconnectPlayerForConnection |
( |
NetworkConnection |
newConnection, |
|
|
GameObject |
oldPlayer, |
|
|
int |
oldConnectionId, |
|
|
short |
playerControllerId |
|
) |
| |
Called on new host when a client from the old host re-connects a player
- Parameters
-
newConnection | |
oldPlayer | |
oldConnectionId | |
playerControllerId | |
- Returns
◆ SendPeerInfo()
virtual new void SendPeerInfo |
( |
| ) |
|
|
virtual |
Send ExtraPeerInfo messages to everyone.
◆ Start()
Grabs a reference to the NetworkManager. Calls Reset().
Make sure to call the base method if you override this.