B
Bjoern
Hi all,
how can i handle the thread-abort in the compactframework.
e.g.
TcpListener listener = null;
public static main()
{
Thread th = new Thread(new ThreadStart(Run));
th.Start();
....
...
...
if(....)
th.Abort(); !!!Error!!! This funktion do not exist
}
public void Run()
{
while(true)
{
.....
// AcceptTcpClient stops the thread and waits for an incoming Client
TcpClient c = listener.AcceptTcpClient();
...
}
}
How can i now abort the Thread Run???
Second question how can i start and close a listener with two buttons??
Everytime the exception: "normally each Socketadress could be used one time" comes.
Thx
how can i handle the thread-abort in the compactframework.
e.g.
TcpListener listener = null;
public static main()
{
Thread th = new Thread(new ThreadStart(Run));
th.Start();
....
...
...
if(....)
th.Abort(); !!!Error!!! This funktion do not exist
}
public void Run()
{
while(true)
{
.....
// AcceptTcpClient stops the thread and waits for an incoming Client
TcpClient c = listener.AcceptTcpClient();
...
}
}
How can i now abort the Thread Run???
Second question how can i start and close a listener with two buttons??
Everytime the exception: "normally each Socketadress could be used one time" comes.
Thx