Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WinSock 2 API & sockets and ports

Status
Not open for further replies.

sysdeamon

Programmer
Mar 7, 2004
1
PK
Hi,
i am using WinSock 2 API & have confusion about port numbers.

Firstly can more than one socket be bind to a single port for listening ?

I have a server & client both using the same port for communication.
The server listens successfully on the specified port, but on accept()/WSAAccept() I create a new socket(say clientsoc) which is returned by accept. Now this socket has a different
port number i.e clietsoc.sin_port is not what i specified either to my client & server.

Yes i have triend using the range 1024-49151 port nmubers, in fact beyond 50050 mostly.

Thanks a lot.

sysdeamon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top