How to difference sockaddr_in struct from same subnetwork and different IP/users
Posted
by
user1428926
on Stack Overflow
See other posts from Stack Overflow
or by user1428926
Published on 2012-05-31T16:33:28Z
Indexed on
2012/05/31
16:40 UTC
Read the original article
Hit count: 201
I am developing a gaming server using the Winsock2 API from Windows, just for now until porting it to Linux.
The main problem I have found is that I don't know how to differentiate gaming clients that come from the same router/network. Let´s imagine 2 gamers that are in the same network going to the Internet through the same router IP and port with, for example IP 220.100.100.100 and port 5000, how can my C/C++ server differentiate both TCP connections and know that they are two different gamers?
Can I find any difference in the sockaddr_in struct that returns the socket when accept(...) returns ??
© Stack Overflow or respective owner