3 réponses
- Le plus récent
- Le plus de votes
- La plupart des commentaires
0
https://github.com/aws-samples/megafrograce-gamelift-realtime-servers-sample/pull/9
Replace the included FindAvailableUDPPort function with this one.
private static readonly IPEndPoint DefaultLoopbackEndpoint = new IPEndPoint(IPAddress.Loopback, port: 0);
private int FindAvailableUDPPort()
{
using (var socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp))
{
socket.Bind(DefaultLoopbackEndpoint);
int port = ((IPEndPoint)socket.LocalEndPoint).Port;
return port;
}
}
The function in the demo example was only created with Windows in mind. However this one will work for Windows, Mac, iOS, and Android. I'm unsure why they haven't tested this pull request yet?
répondu il y a 4 ans
0
@REDACTEDUSER
Have reached out to a few folks to try and get the pull request handled.
répondu il y a 4 ans
Contenus pertinents
- demandé il y a 7 mois
- demandé il y a 2 jours
- demandé il y a 2 ans
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a 7 mois
- AWS OFFICIELA mis à jour il y a 2 ans