❔ open port through code

I want to make a multiplayer game where the clients can host a server on their computer and have people connect and play with them using the socket library but obviously unless this is done locally the router will not get the communication as the port will not be open. I don't want my players to have to manually open a port is it possible to do this through code
16 Replies
GoogleChrom
GoogleChromOP2y ago
i want to be able to do this on all operating systems
jcotton42
jcotton422y ago
I believe this is what UPnP is for Otherwise there's no standard for getting routers to open a port
GoogleChrom
GoogleChromOP2y ago
what is that
jcotton42
jcotton422y ago
Universal Plug and Play
GoogleChrom
GoogleChromOP2y ago
does they system library contain an implimentation of this
jcotton42
jcotton422y ago
No I'd suggest googling around for a library that can do it
GoogleChrom
GoogleChromOP2y ago
ok
jcotton42
jcotton422y ago
And also provide directions in case it's disabled on the router
GoogleChrom
GoogleChromOP2y ago
i found another thing
jcotton42
jcotton422y ago
Not what you're looking for
GoogleChrom
GoogleChromOP2y ago
yeah i'm very new to networking as a whole just want to find a way to play with it
jcotton42
jcotton422y ago
Ignore all of System.Remoting It's old, cursed RPC stuff from the early framework days
GoogleChrom
GoogleChromOP2y ago
lol ok thx the majority of the librarys only work for windows machines
GoogleChrom
GoogleChromOP2y ago
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server