Not being too sure of what I'm doing, I'd like to first apologise if my question is vague or stupid.
Basically, I want to write client and server apps (in Delphi 5) where the server allows multiple clients to log on at the same time.
Two of the clients can then choose to play a game against each other via the server, so the server would need to send the same data to just those two clients (only text and the occasional jpg file). All the 'gaming side' would be controlled by the clients and data passed back to the server.
Would this be done best with an ftp, http or UDP client/server setup (if it matters)?
I've spent months experimenting with doing this - with no success. I can use the Delphi native socket components to create the client/server connection, but haven't been able to figure out which of the current connections on the server is which. For example, my server app will tell me that there are 4 active connections, but I can't seem to find out which one is Bob and which one is Dave so I can 'link' them together to send data just to them.
If I could attach an IP address to each connection, it would help, but Socket.RemoteAddress just causes an error when I try to use it.
The only option seems to be to send the same data to *all* four connections and have the client end ignore info not meant for them. This seems to be a lot of wasted bandwidth to me.
Can anyone suggest the best way to go about doing something like this please, or point me to some resources on the net which cover this in Delphi?