Thread: Monitoring new connections requests

  1. #1
    C/C++ Learner & Lover
    Join Date
    Aug 2008
    Location
    Argentina
    Posts
    193

    Monitoring new connections requests

    I'm using a monitoring system to know when a socket is ready to be written or read, but what about incomming connections to accept? How can I detect them? I was told that when using poll, epoll, or select, the incomming connection are signilized with a write.
    How is the connection request done?
    Thanks in advance

  2. #2

  3. #3
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    When a connection is waiting in the listen queue, the socket becomes readable and a call to accept() would return immediately.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  4. #4
    C/C++ Learner & Lover
    Join Date
    Aug 2008
    Location
    Argentina
    Posts
    193
    Thanks a lot!, that was my doubt, I can't thank you enough =)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Monitoring net connections
    By geek@02 in forum Tech Board
    Replies: 5
    Last Post: 03-08-2010, 09:36 PM
  2. Writing all HTTP requests from a website to a log file
    By goomyman in forum C# Programming
    Replies: 1
    Last Post: 07-29-2005, 09:18 AM
  3. Select handling more then 500 connections
    By Chronom1 in forum Networking/Device Communication
    Replies: 5
    Last Post: 02-27-2005, 03:20 PM
  4. WinXP Network Connections pop-up
    By DavidP in forum Tech Board
    Replies: 1
    Last Post: 10-02-2002, 05:36 PM
  5. Multiple Client Connections
    By (TNT) in forum Windows Programming
    Replies: 1
    Last Post: 04-06-2002, 11:04 PM