470,821 Members | 2,067 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,821 developers. It's quick & easy.

which ports to use for SOAP?

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
1 1540
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.

Similar topics

7 posts views Thread by Mickel Grönroos | last post: by
reply views Thread by bigbinc | last post: by
reply views Thread by nezoat | last post: by
2 posts views Thread by joaquimfpinto | last post: by
2 posts views Thread by furrypop | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.