Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Create Server Sockets using multiple ports

 
Abhijit Das
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to create sockets in the server code in two different port (say 2407,3004).One is used to receive from and other one to send to my clients.

Similarly, I want create the sockets in the client end using for the said purpose.

A brief code snippet will help.

Thanks
 
Joe Ess
Bartender
Posts: 9300
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sockets are two-way connections so you only need to connect once between a server and client. Have you looked at the Java Networking Tutorial?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic