how to create a local area network simulation using java

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • itcoll
    New Member
    • Nov 2008
    • 3

    #1

    how to create a local area network simulation using java

    i just want to create a simulation of LAN [ 3 clients ] using java. i got the code for the client and serversocket programs - although i could make connection between 3 clients and a server socket , iam not able to create a connection directly between 2 clients without the help of server socket .it will be great if you pls give me idea on how to create a simulation .
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by itcoll
    i just want to create a simulation of LAN [ 3 clients ] using java. i got the code for the client and serversocket programs - although i could make connection between 3 clients and a server socket , iam not able to create a connection directly between 2 clients without the help of server socket .it will be great if you pls give me idea on how to create a simulation .

    It depends on how you want to do it:

    1) all traffic goes through the server; you have to add a destination 'address' to every message you send to the server but logically want to have sent to another client.

    2) send messages from 'peer to peer'; all clients need to be a 'server', i.e. they all need to have a server socket which accepts incoming connect requests.

    kind regards,

    Jos

    Comment

    Working...