Page 1 of 1

Available ports for server sockets

Posted: Wed May 12, 2010 5:43 pm
by ale870
Hello,

I'm working to create a server socket for a program, and I'm using "accept connections" to open server ports. The problem is that function open a port even if it is already busy!
How can I check if a port is busy or available?

Thank you for your help!

Re: Available ports for server sockets

Posted: Wed May 12, 2010 5:59 pm
by Klaus
Hi ale870,

you could check "the opensockets()" before.


Best

Klaus

Re: Available ports for server sockets

Posted: Wed May 12, 2010 6:19 pm
by ale870
Thank you, but that function works only to check which ports are open from RunRev self. If my browser web open some ports, I cannot check them.
Now I'm using the command (command line in Windows): netstat -an|find /i ":1027" where "1027" is the port I want to check, but I wanted to avoid to use command line.