You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-17 07:36:32 +09:00
Chat sample now outputs remote hail
This commit is contained in:
@@ -54,11 +54,16 @@ namespace ChatServer
|
||||
string text = im.ReadString();
|
||||
Output(text);
|
||||
break;
|
||||
|
||||
case NetIncomingMessageType.StatusChanged:
|
||||
NetConnectionStatus status = (NetConnectionStatus)im.ReadByte();
|
||||
|
||||
string reason = im.ReadString();
|
||||
Output(NetUtility.ToHexString(im.SenderConnection.RemoteUniqueIdentifier) + " " + status + ": " + reason);
|
||||
|
||||
if (status == NetConnectionStatus.Connected)
|
||||
Output("Remote hail: " + im.SenderConnection.RemoteHailMessage.ReadString());
|
||||
|
||||
UpdateConnectionsList();
|
||||
break;
|
||||
case NetIncomingMessageType.Data:
|
||||
|
||||
Reference in New Issue
Block a user