ets work out 1 here then you sould be able to work with more
Remember each thead can only be used 1 time before it is trash
first off your app has a 200 loop count, I am pritty sure you can only throw
25 threads at a time.
private thd as system.threading.thread
private eip as string
private sip as string
private structure iprange
dim startip as string
dim endip as string
public sub New
dim ssplit as object
ips = new iprange
ips.startip = 192.168.0.250
ips.endip = 192.168.0.254
ssplit = split(ips.end,".")
eip = ssplit(3)
ssplit = split(ips.startip ,".")
for i = sip to eip
thd = new system.threading.thread addressof
thd_tick(left(ips.endip,(len(ips.endip)-len(ssplit(3)) & i)
private sub thd_tick(byval ip as string)
'do your stuff here with the ip address
this is just a quick dirty example. I do not know if it even works because I
am coding in OutLook.. Lol it should give you the right idea.
I want to ask again why are you using an array() to hold your threads? Look
in to the thread appartment, I have never used it so I can not give you an
example. I have never needed to use it. But the appartment I think takes
care of handling the thread throwing. Meaning if you have 50 threads
waiting to go, it will only throw 25 when 1 finishes it throws another.. I
might be pulling that out of my ass. But I think that is what it is for.
Now what that code is doing is for every ip address it is creating a new
I want to say you have a max number of threads of 25. Not 100% on that. but
I do know there is a max.
so you gotta make sure your checking
that code is not above.
About the sockets..
I dont know if this is a problem but I would assume it would be.. It to make
sure that the port your trying to use is already not in use by another
You half to wait for them to time out? is ack/nak on. If so then the socket
is it waiting for a comply packet? Are you closing the socket out?
I would like to see a thread appartment in action. If you want some help
with any of this you can send you code to XXXX@XXXXX.COM
gotta run and get the kid from daycare. But let me know if any of this
"Stressed Out Developer" < XXXX@XXXXX.COM >
wrote in message news: XXXX@XXXXX.COM ...