• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

How do I get the UDP port from network_create_socket()?

  • Thread starter GhostlyImprints
  • Start date
G

GhostlyImprints

Guest
Is there a way to get the port that was used when calling this function:
network_create_socket(network_socket_udp);

Only way I've found is to fire a datagram to a server and get the port that way, but is it possible to do it locally?

Can I retrieve the port I just opened in GameMaker itself?

Something like this:
Code:
socket = network_create_socket(network_socket_udp);
port = network_get_socket_port(socket);
 
Top