Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Professional
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional 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 March 26th, 2007, 09:39 AM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post
Default

Parsons, thanx for your suggestion and patience in this matter, yes I could see from netstat that status of port 10 is listening, but the real problem is that the code doesn't move to the next line after connecting, i.e.

TcpListener tcpListener = new TcpListener(10);
            tcpListener.Start();
            Socket socketForClient = tcpListener.AcceptSocket();

//The code does not go to the lines below
            if (socketForClient.Connected)
            {
                        }
Any idea..... (Mind really not working, its almost 11 hours in the office now)

Regards
Mike

Fortune favours the brave, so don't regret on missed oppurtunities.
 
Old March 26th, 2007, 09:53 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Ahhh. You are having a problem actually connecting the client to the server and dealing with that connection.

Instead of a Socket try:

if(server.Pending())
{
 TcpClient connection = server.AcceptTcpClient();
}

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
Socket Programming lisamargaret C# 1 December 18th, 2007 10:20 AM
Advanced help with dropdown items! (parsons, imar) mike_remember ASP.NET 1.0 and 1.1 Professional 1 April 11th, 2007 08:33 AM
Socket Programming ashu_from_india General .NET 0 June 28th, 2005 12:02 PM
Socket programming vinodkalpaka J2EE 0 June 16th, 2005 02:43 AM
Socket Programming chinni Pro PHP 1 August 18th, 2003 03:59 PM





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