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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unable to use TCP ports

Status
Not open for further replies.

NeilV

Programmer
Oct 14, 2002
117
0
0
GB
Hello,

I have created a small client/server app in vb that uses tcp ports to talk to each other. I have tested my app with several workstations using a range of different ports and it works fine. However, when i tried it on the server I always get a runtime error 10048 (address in use). I have tried loads of different ports but i always get the smae error. I have used netstat -a to see what ports are being used and only a few are in use.
Has anyone ne idea whats happening?

Neil

The server is running windows NT 4 sp 6
 
A few questions.

Are the ports that you are attempting to open above 1023? If not, you should need to be logged in as administrator to open them.

Do you have the error when you are attempting to listen on the port, or when you attempt to open them (after the connection request)?

Are you using a port number of '0' for the outgoing connections? Or are you attempting to originate through a static port number?

Do you get the same error when you are the originator of the connection, or just when you are receiving the connection?
pansophic
 
If you are using Winsock in VB add this on the client:

Code:
Winsock1.Close
Winsock1.Connect 222.222.222.222, 1432
Code:
'or any other port

and this on the server:

Code:
Winsock2.Close
Winsock2.Localport = 1432
Winsock1.Listen

Correct me if I am wrong (and I probably am ;-)).

-Philippe Signoret
 
Port 1432 is also used for Blueberry license management. Is your server involved with any Blueberry traffic?
 
opps!! I'm not sure why but it seems to work ok now.

Thanks for the help though.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top