Reputation: 326
I am in a situation where I must use a particular port for firewall reasons on one side to make a peer to peer connection. I was wondering if it's possible to open a connection with a client on a particular port. I know about the listen()
and accept()
functions.
Thanks
Upvotes: 0
Views: 86
Reputation: 59987
You need to use bind (http://linux.die.net/man/2/bind).
There are many examples of servers on the web.
Upvotes: 1