socket connection in a .NET Applet
Hi, I have created a .Net Applet that connects to an FTP server via sockets. The problem is that the connection to the socket takes a long time (at around 100+ seconds). I tried creating an implementation of the FTP class in a Windows Form and I got connected faster (roughly 1-3 seconds).
Are there issues when connecting/opening sockets in .Net Applet?
public Boolean Login()
// Create socket
m_objClientSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
// Create IPEndpoint
IPEndPoint ep = new IPEndPoint(Dns.Resolve(m_sRemoteHost).AddressList, m_iRemotePort);
// Connect Socket takes a long time in applet
MessageString = m_sReply;
throw new IOException("Cannot connect to the remote server. Error: " + ex.Message);