Available ports for server sockets

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
ale870
Posts: 250
Joined: Tue Apr 22, 2008 9:17 am
Contact:

Available ports for server sockets

Post by ale870 » Wed May 12, 2010 5:43 pm

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!
Runtime Revolution Widgets, tutorials, tips & tricks and more!
http://runrevwidgets.com/wiki

Klaus
Posts: 14198
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Available ports for server sockets

Post by Klaus » Wed May 12, 2010 5:59 pm

Hi ale870,

you could check "the opensockets()" before.


Best

Klaus

ale870
Posts: 250
Joined: Tue Apr 22, 2008 9:17 am
Contact:

Re: Available ports for server sockets

Post by ale870 » Wed May 12, 2010 6:19 pm

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.
Runtime Revolution Widgets, tutorials, tips & tricks and more!
http://runrevwidgets.com/wiki

Post Reply