This week's book giveaway is in the Agile forum.
We're giving away four copies of Head First Agile and have Andrew Stellman & Jennifer Greene on-line!
See this thread for details.
Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

two processes listening to the same port  RSS feed

 
Gotham Sewani
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The game 'age of empires' is quiet famous on our LAN and we play multiplayer matches quiet often. Now,aoe listens to some specific ports while playing multiplayer matches. Is it possible to write a java code that listens to the same ports,and finds out the IP address of the machine trying to connect? Two processes listening to the same ports wont cause any problems?
 
Chris Beckey
Ranch Hand
Posts: 116
Eclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Assuming just one IP for the machine then no it won't work, you'll get an error when you try to open the socket.
 
Gotham Sewani
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then is there any other way to do it?
 
Chris Beckey
Ranch Hand
Posts: 116
Eclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Download a port sniffer (Etheral) and look for "interesting" packets or run everything through a proxy.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!