1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-14 22:26:29 +09:00

masterserver sample work

This commit is contained in:
lidgren
2010-05-11 20:42:58 +00:00
parent e62057c250
commit 6afb80ab12
6 changed files with 23 additions and 3 deletions

View File

@@ -52,9 +52,12 @@ namespace MSClient
m_hostList.Add(new IPEndPoint[] { hostInternal, hostExternal });
m_mainForm.comboBox1.Items.Add(hostExternal.ToString());
m_mainForm.comboBox1.Items.Add(hostExternal.Address.ToString());
}
break;
case NetIncomingMessageType.NatIntroductionSuccess:
MessageBox.Show("Nat introduction success; I just received a message from " + inc.SenderEndpoint);
break;
}
}
}
@@ -93,6 +96,7 @@ namespace MSClient
// write external address of host to request introduction to
IPEndPoint hostEp = new IPEndPoint(NetUtility.Resolve(host), CommonConstants.GameServerPort);
om.Write(hostEp);
om.Write("randomtoken");
m_client.SendUnconnectedMessage(om, m_masterServer);
}