This week's book giveaway is in the JDBC forum.
We're giving away four copies of Make it so: Java DB Connections & Transactions and have Marcho Behler on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Socket Creation doubt? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic

Socket Creation doubt?

Anand Divakaran

Joined: Jul 20, 2007
Posts: 6
I am trying to write a simple client server program, both the client and server program resides on the same local machine .
while creating a socket i dont know which port to mention
public Socket(InetAddress,int port)

How can i know which ports i can use .
i am working on my personal system so there is no question of admin problem
or restrictions
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42959
Please do not post the same question to multiple forums: CarefullyChooseOneForum

Let's continue the discussion in this duplicate thread.
I agree. Here's the link:
subject: Socket Creation doubt?
It's not a secret anymore!