|
Re: online game
BinarySurfer, i thought about making the socket public but i was thinging about the fact that if multiple peopel connect to the server then you have the issue of all the connection sockets being named the same, which of course is not going to be helpful.
However creating a class would work well, cause it would allow you to store other information about that client as well which could prove helpful. Just then remains on knowiing which class you want to check for the connection.
As i know if you use a couple of arrays then they can link niceley bassed of one thing such as a user name and from that you can then retrieive the IP from another array. But i guess you could implement something very similar with classes.
Cheers,
Chris
__________________
Who said i couldn't program
sarcasm = raw_input('Type in a sarcastic remark: ')
print sarcasm
|