Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Client to client data transfer

Nirwanda

New member
Joined
Aug 18, 2014
Messages
285
I am making a tcpip based client server based game, and right now I'm working on the in-game chat and it got me thinking.

The client sends a message to the server who re-distributes it to other relevant clients (logic depends on which chat channel the source is sending the message through). That's quite a bit of work and bandwidth strain for the server. Strings are heavy.

A system where the client bypasses the server and sends it straight to the other client(s) would be very handy in this situation, and I'm sure many others too which are not "crucial" and need not be verified by the server.
I suppose you could make a case for the server wanting to see all text messages for verifying reports of foul language, say. But that's beside the point.

The problem as I see it is that the clients down need to have connections to all other clients? Perhaps there is some neat way of using UDP or something in that case.

I'm not very experienced with network programming, and just tossing the idea out there. I am using vb.net
 

Shaggy Hiker

Super Moderator
Joined
Aug 6, 2002
Messages
34,844
UDP has the problem that most firewalls will block it by default. Therefore, you'd have a bit of a headache getting it working because you'd have to have people configure firewall rules, which is probably somewhere you don't want to go.

If you are talking about two way communication, then you might consider letting the server send the IP back to the client. So client A wants to talk to client B, then A could ask the server for the IP of B. The server would send the IP of B back to A, then A would connect to B using that. Of course, this would mean that each of your clients would have to also be a server, but that might not be too much of a burden, since they'd rarely be accepting connections.

If you were on a LAN, I'd totally go with UDP, but I'm pretty sure you aren't talking about a LAN game.
 

Nirwanda

New member
Joined
Aug 18, 2014
Messages
285
Okay, I had no idea about the UDB firewall blockage. Having users configure firewalls is a big no.
The IP idea sounds interesting, but I'm not sure my users would be comfortable with the server sending their IP out to strangers.
 
Top