Click to See Complete Forum and Search --> : TCP listener on a thread wont stop


raistlinneo
April 25th, 2003, 10:43 AM
Hey, I'm trying to set up a tcplistener on a different thread so i can still use my app while i wait for an incoming connection. However, If exit the application before the connection is established, the listener thread keeps running. How do I make the application kill the thread when it exits. I've tried Thread.Stop() but it didn't work


Thanks in advance

coolbiz
April 25th, 2003, 12:08 PM
Do THREAD.ABORT()

-Cool Bizs

raistlinneo
April 25th, 2003, 12:37 PM
oops, thread.abort is the right command. That did the trick, but there was something else I had to do to make it stop. I was dimming the tcplistener from within the sub, and i couldnt stop it from the other sub.

so just a note to anyone else trying the same thing and having problems., dim the tcplistener from outside the subroutine. easier to stop that way


thank for the help coolbiz