Re: [2005] TCP socket server example?
Ok i am trying it Vampire, by the way If someone computers crashes will I then see that the client is disconnected ? (can t test it since 1 pc only atm :p). If not how can i make so if a (client) pc crashes that i remove the client from that hashes thingie :p?
Re: [2005] TCP socket server example?
Quote:
Originally Posted by ^^vampire^^
1 - Can't say i really have but what info is going to be in that array and what is the array for exactly?
2 - For your second question do you mean that you're trying to separate which information goes to which group [eg] if you receive a message from a client BROADCAST|GROUP|MESSAGE that the message is only broadcast to the members of that group?
the array I have is used to store who is in what group and some other network info. There is a structure associated with the array and I was thinking about using BROADCAST|GROUP|MESSAGE|param1|param2|.... and separating all the data into the proper place in the array. its a total of less than 200 characters of text
Re: [2005] TCP socket server example?
any kind of disconnect whatsoever will be caught and dealt with in the DisconnectClient sub whether they disconnect by themselves or if their pc crashes.
1 Attachment(s)
Re: [2005] TCP socket server example?
i've added the updated code for you.
Look at the following subs for changes.
OnlineReceived - extra parameter for groupname
LoginClient - adds client to a group on login
Broadcast - receives new parameter for group sending
ClientConnection - now has a groupname property
also look at the very bottom of the code and read the comments. it tells you how to add new commands etc. With the updated ClientConnection class you wont need an array to hold who is in which group unless that is required for something else. Why not just use a few variables to store this network info instead of an array or is the array for a specific purpose?
Re: [2005] TCP socket server example?
using the array as a somewhat orderly way to store the data with a structure to make it easier to fill the list view for display of the data.
will take a look at the code and let you know if I have any further questions.
once again I really appreciate the help on this, take care.