Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Filter server

 
Kamal Chopra
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Hi all,,
I need to implement a TCP Server which should listen on port 1234 and should have ip=192.168.1.1,,,,
It should be able to accept connections of same subnets clients i.e.
192.168.1.2-254;;;
When it gets desired client should say to him Hello otherwise others should be welcomed "Good Bye"..
Any suggestions ??
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
...and should have ip=192.168.1.1

That's not something the server code has control over - you need to run the code on whatever machine has that IP.

As for writing the code, start reading at http://docs.oracle.com/javase/tutorial/networking/sockets/index.html
 
Kamal Chopra
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's not something the server code has control over - you need to run the code on whatever machine has that IP.


i know...its for assumption purpose dude
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic