Java client server issues

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • EmilKTH
    New Member
    • Mar 2010
    • 3

    Java client server issues

    Hello everybody,

    Maybe someone from you can help me.
    I am writing a server/clients in java, and i need to store the request IP addresses from the clients and respond only to them with a same udp package just a different ip address ofcourse.
    The point is i have a server that broadcast udp packages and clients that respond to that broadcast, the clients are all the time listening for the broadcast message.
    So when the client responds, the server should store the ip so later on he can send a command on those particular IP`s.
    The server is made to work with smth like 10 to 20 clients.

    If anyone has a clue please let me know...
    or if further details are needed.
  • sukatoa
    Contributor
    • Nov 2007
    • 539

    #2
    I am writing a server/clients in java, and i need to store the request IP addresses from the clients and respond only to them with a same udp package just a different ip address ofcourse.
    a suggestion:

    for you to be able to capture their specific IP address, you have to add a TCP implementation( ServerSocket and Socket). A thread with a piece of code there so as the client... you are to implement only for that purpose... and
    after you captured their IP addresses, you may create your own communication protocol for the server/client(indicato rs that the client's ip have already registered) then cut the TCP connection between the server and client, then you may start broadcasting your udp packages with modified ip address.

    Hope that helps

    Comment

    Working...