I've been working on fairly simple client-server setup for a game, using UPD (It's an arena shooter with lots of moving objects) and doing raw socket programming in C. I know how to create sockets, how to send, receive and process packets and whatnot, and at the other end I know what I want to send, who to and how often. However I've got a fairly substantial gap in my knowledge about the general layout I should be using:
Should I be using separate sockets on the server for each client, what are the advantages/disadvantages of this over a single socket for everyone?
Should I have separate inbound/outbound sockets? I believe this is a requirement for TCP, not sure how UDP deals with it though. I know using one socket for both in and out works, just not sure if it's a good way of doing things.
How do I allow any combination of clients and server using IPv4 and IPv6 to connect to each other?
Perhaps I'm just not searching for the right terms, but I'm having difficultly finding resources and this bit-in-the-middle sort of thing, so any help would be great!