Sign in to follow this  
ryan009ryan

client to client connection

Recommended Posts

ryan009ryan    100
I want client socket should connect with another client socket. I am seeing IP of another client which are connected with server. How will i do for client to client connection for messages.

Share this post


Link to post
Share on other sites
Evil Steve    2017
Just call connect() on each client to connect to the address of the client.

Each client will need to be accessibly from every other client though, which is usually difficult to do over the Internet.

Share this post


Link to post
Share on other sites
ryan009ryan    100
Hello Evil,

This is being crash.My client is being close with an error message.

And 1 important thing is let suppose 3 client with server are communicating with each other. A 3rd process can sniff data which is fully unknown about these all.This 3rd process has not information of all clients and server.Is there any way to do this ?
I am asking only concept no need coding explanation.
Thanks

Share this post


Link to post
Share on other sites
Evil Steve    2017
Quote:
Original post by ryan009ryan
This is being crash.My client is being close with an error message.
That's a bug in your code then. You'll need to debug your code to find out why it's crashing. I can recommend reading this article.

Quote:
Original post by ryan009ryan
And 1 important thing is let suppose 3 client with server are communicating with each other. A 3rd process can sniff data which is fully unknown about these all.This 3rd process has not information of all clients and server.Is there any way to do this ?
If you're asking if there's any way to prevent someone sniffing the data, then no. You can encrypt the data though, so the 3rd party can't understand what's being sent.

Share this post


Link to post
Share on other sites
Evil Steve    2017
Quote:
Original post by ryan009ryan
It means if i will not encrypt then someone can sniff data easily OR this is possible to sniff data ?
It's always possible to sniff data. You can use a tool like Wireshark to do that over the local network, or any 3rd party that the data passes through can sniff the data.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this