Can i recognize a client without receiving data on server from this client. I have two clients, where client one would send a message to client 2. Client 2 must receive this message to begin the processing and send back other necessary datas to client 1.
My two clients are communicating with eachother only when datas are received atlist once at the server.
can i make it anyway that client2 will be identified without sending a message to server only by connection ?
Let me know if you have an idea or sample code on this..
client1 sends data to server and server must send this data to client2, then only client 2 will be able to communicate further. Client2 will be activated only when it receives the correct datagram from client1.
client1 ---- > Server ------> client2 (must receive the first telegram )
after first telegram is received at client 2 , both client 1 and client2 operate like a simple chat server.
Yes. Exactly Client 2 is also Server. How can i give client 2 address ?
It is only being recognized after a packet is received from client 2 at Server. But in reality Client 2 will only Start when a datagram from client 1 is received by it.
Instead of using a configuration file, broadcasting would be another way of finding services. The initiator, say client1, sends a broadcast telegram to a port commonly known by all servers, asking for service request. The server, say client2, implicitly gets client1 address when using recvfrom(). So client2 may answer a client1 request.
I solved this issue somehow and i know how it can be identified. I have come accross anothe r issue after your suggestions on receiving strings here on this post.