How to sends data over network ?Help me!!
Hi ,I am beginner of learning Java Networking.I want to connect 3 or more computers. One for server and others(eg A and B )for clients .But I want to connect
1.A to Server and vise versa
2.B to Server and vise versa
3.A to B and vise versa.
First I want to send message from either A or B to server and server sends stored data to sender(eg A ) and sender (A ) will connect to B .Then A and B will confirm message and A and B will send data one to another.But this occasion can occurs from A and B concurrently.
But I just learned simple code for connection of one server and one client using Server socket and socket . Will all 3 computers require to act for both server and client ?Is there other ways to connect between clients . I don't know how to consider to solve data conflict between computers . I also want to satisfy if new clients are added . If anyone know to solve above problem including data conflicts ,pls help me with simple sample code for both server and clients . Thanks !!