I
Imogen
Guest
I have created a UDP sockets class. But theres a fundamental flaw in the class.
When the UDPclient is listening for a reply from the server it hangs my program if no reply is sent. I got over this by running the udpsend in another thread. Great but now I have a thread that needs killing. I thought of using the timer the kill the thread if it didnt repond in the alloted time, but apparently timers only work in a single threaded environment.
Has anyone got any suggestions of how to get around this problem?
Strange to think that with VB6 this task was done easily within 5 mins (this is my 3rd day in VB.NET!
Imogen
PS before you suggest using a TCP client server with a definite connection state, I cant the server is pre-written and I do not have the source code to authority to change it.
Also I could use the VB6 OCX to achieve the desired result... but feel I shouldnt have to, should I be able to do it just as well (if not better in .NET)
When the UDPclient is listening for a reply from the server it hangs my program if no reply is sent. I got over this by running the udpsend in another thread. Great but now I have a thread that needs killing. I thought of using the timer the kill the thread if it didnt repond in the alloted time, but apparently timers only work in a single threaded environment.
Has anyone got any suggestions of how to get around this problem?
Strange to think that with VB6 this task was done easily within 5 mins (this is my 3rd day in VB.NET!
Imogen
PS before you suggest using a TCP client server with a definite connection state, I cant the server is pre-written and I do not have the source code to authority to change it.
Also I could use the VB6 OCX to achieve the desired result... but feel I shouldnt have to, should I be able to do it just as well (if not better in .NET)