Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 25th, 2005, 08:04 PM
Registered User
 
Join Date: May 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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?

sample code


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[0], m_iRemotePort);

try
{
// Connect Socket takes a long time in applet
m_objClientSocket.Connect(ep);
}
catch(Exception ex)
{
MessageString = m_sReply;
throw new IOException("Cannot connect to the remote server. Error: " + ex.Message);
}

.......







Similar Threads
Thread Thread Starter Forum Replies Last Post
Socket connection Lizane Java GUI 1 September 23rd, 2007 11:11 PM
Socket Exception in Applet srinivasreddy Java GUI 0 June 29th, 2004 01:14 AM
how to create a socket connection? Janet Classic ASP Professional 0 December 30th, 2003 06:42 PM
Secure Socket Connection planeswalk ASP.NET 1.0 and 1.1 Professional 0 July 22nd, 2003 11:04 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.