C
cocla
I try to connect to server using following codes:
(smart device application)
Socket s=new Socket();
try
{
s.connect(host);//host is an object of IPEndPoint class
}
catch (SocketException)
{
System.Windows.Forms.MessageBox.Show("can't connect..");
}
Why does it takes 5 minutes to show the "can't connect"
message?(Users must wait for long time to know the
message.)Is there any solution to solve this problem??
PS:it takes only 5 seconds to show the message when
I use the same codes in windows application.
(smart device application)
Socket s=new Socket();
try
{
s.connect(host);//host is an object of IPEndPoint class
}
catch (SocketException)
{
System.Windows.Forms.MessageBox.Show("can't connect..");
}
Why does it takes 5 minutes to show the "can't connect"
message?(Users must wait for long time to know the
message.)Is there any solution to solve this problem??
PS:it takes only 5 seconds to show the message when
I use the same codes in windows application.