L
liangbowen
As i konw, the only way to to terminate a thread started by
_beginthread() is to user _endthread() (or return) inside the thread.
now i started a thread(TodoThread), and created a listenning socket
inside the thread.
I want to destroy the socket and kill the thread at anytime if there is
no client connect to it. How?
void TodoThread(PVOID pvoid){
//creat a tcp socket
//then listen
accept();
//.....
}
_beginthread() is to user _endthread() (or return) inside the thread.
now i started a thread(TodoThread), and created a listenning socket
inside the thread.
I want to destroy the socket and kill the thread at anytime if there is
no client connect to it. How?
void TodoThread(PVOID pvoid){
//creat a tcp socket
//then listen
accept();
//.....
}