PDA

Click to See Complete Forum and Search --> : PLEASE HELP! Wisock question


winapi
Jun 10th, 2000, 01:56 AM
Hi,
I'm writing a multiuser FTP/CHAT server. I am somewhat fimiliar with accecpting connections and getting the user logged in. For my chat client I wrote a function called PARSE. it it very simple, it takes a comma delimited string and breaks it down into a multidim array (index for socket,itemnum in string). My question is, if two people send data at nearly the name time and I then send that data to my function, am I going to need to set up all my var as an array to keep them from getting confused. I have most of the vars in the function defined as arrays, but my counter vars for my loop statements are not. If one socket sends data to this function, and another socket send more data before the function is over, will my counter varialbes get mixed up. The counter var are not global vars, and are only used in the function. Thanks
Richard Lange

HaxSoft
Jun 10th, 2000, 09:17 AM
Hey winapi

I think you would benefit from the Collection class: It will keep track of the count for you automatically. You can always find the number of vars through the Count property.

Are you unfamiliar with the Collection class in VB? Then post a question on this web site. There are many skilled programmers here, who will help you.

Personally, I love the collection, but I am going on my vacation today, so I will probably not see your reply until 4 weeks from now.