Socket.Connect problem

Hello,
I have a client (micro framework) and server (console application) which communicates over TCP/IP. If the server is unavailable when I try to send data with clients Socket.Connect(EndPoint), it hangs. I’m using MF 4.2 and would like to have some sort of thread timeout. I’m connecting to server with another thread and try to terminate it with Thread.Abort from main thread, but it’s hangs also. Any solution?

thanks