|
-
Jun 12th, 2003, 01:33 AM
#1
Thread Starter
Addicted Member
Sockets...and i do mean more than 1 at a time...
heres wut i've been trying to do for the longest time....searched the internet over....search here countless as well....anyway heres what i want to do....
create a new socket....dynamicly....give it a name or index....so i can send it commands....and set it up so that it will return events such as connection and such....
basicly i want to set it up like an array....creating a bunch of sockets in one sub.....then giving them commands from another sub....
most of what i can found on the internet gives me an example of creating the socket....connecting...sending and recieving data...and closing, all in one sub.....but i really need to make the control public....
main thing im looking for here is to be able to create an array to connect to a certin amount of remotehosts which is determined at runtime.....
see wut im saying?
AcE
-
Jun 12th, 2003, 08:26 AM
#2
Lookup some imformation on HashTable collections. I dont hve any examples available currently(on my other computer and it is dead currently). But you store each instance of a connected client class into the collection.
-
Jun 12th, 2003, 08:44 AM
#3
Thread Starter
Addicted Member
kewl....wuz kindof thinking they had to be put into some type of collection.....would love a example of a hashtable....but i'll check around....thx
AcE
-
Jun 12th, 2003, 09:02 AM
#4
some example:
http://www.devasp.net/net/articles/article.aspx?ID=44
They are just adding strings, but remember, strings are objects too so it is the same thing really.
-
Jun 12th, 2003, 10:06 AM
#5
Thread Starter
Addicted Member
well im at work now.....but i'll check this out tonight....but ... how would it throw events?....i mean...lets say for examplei got 10 sockets in that collection....how do i say, when you throw the datarecieved event....do this....
AcE
-
Jun 12th, 2003, 10:16 AM
#6
The same way you intercept any other event. You use AddHandler
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|