Two Laptop Bag*
The moose likes Sockets and Internet Protocols and the fly likes Filter server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Filter server" Watch "Filter server" New topic
Author

Filter server

Kamal Chopra
Greenhorn

Joined: Jul 30, 2013
Posts: 19


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
Marshal

Joined: Mar 22, 2005
Posts: 41089
    
  43
...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


Ping & DNS - my free Android networking tools app
Kamal Chopra
Greenhorn

Joined: Jul 30, 2013
Posts: 19
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Filter server
 
Similar Threads
Wasteful Client Socket Connections
Package structure
how a client locates a server
RMI Question, Please HELP
Display of contents from TextArea