|
-
June 20th, 2002, 02:48 PM
#1
Slow Stream Socket Connection
I'm connecting to a remote server via a stream socket and am experiencing exceptionally slow connection times. For example, using a valid IP address and port number, the following code finishes connecting to the server in 4 to 7 seconds. using System;
using System.Net.Sockets;
*****************************************
namespace TCPClient
{
public class TCPClient
{
public TCPClient()
{
TcpClient client;
client = new TcpClient();
client.Connect("123.123.123.123", 99999);
}
static void Main()
{
new TCPClient();
}
}
}
*****************************************
Corresponding code in Java, or C++ completes in a few milliseconds.
Does anybody have any suggestions as to why this may be occurring?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|