By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,621 Members | 1,074 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,621 IT Pros & Developers. It's quick & easy.

which ports to use for SOAP?

P: n/a
Hi,

I'm writing something that specifies the use of SOAP. One requirement
that fumbles me is the port number(s) to use. Is there any way to find
out which ports are not used by the system? I've looked in the library
reference and doesn't seems to get anything.

Is there a problem with say 2 programs using the same ports?

Thanks in advance.

Maurice
Jul 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On 6/17/05, Maurice LING <ma*********@acm.org> wrote:
Hi,

I'm writing something that specifies the use of SOAP. One requirement
that fumbles me is the port number(s) to use.
(I assume you're talking about TCP ports, not SOAP ports.)
Is there any way to find
out which ports are not used by the system?
Try binding to a port and you'll get an 'Address already in use error'
if it's occupied :)
I've looked in the library
reference and doesn't seems to get anything.

Is there a problem with say 2 programs using the same ports?


AFAIK, even the same process can't bind to the same port twice:
import socket
s1 = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s1.bind(('localhost', 8000))
s2 = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s2.bind(('localhost', 8000))

Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "<string>", line 1, in bind
socket.error: (10048, 'Address already in use')

- kv
Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.