LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-20-2015, 05:44 AM   #1
redjupiter58
LQ Newbie
 
Registered: Dec 2010
Posts: 11

Rep: Reputation: 0
listen socket ands backlog


Hi Guys,

What happens if I have a listen socket, say with backlog 10. 10 clients attempt to connect but Ionly accept 3 and close the listen socket. what happens to those waiting in the backlog queue? Are they sent a RST?
 
Old 11-20-2015, 08:35 AM   #2
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,862
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
Actually, the kernel automagically accepts the incoming connections, but it is likely that they will be cancelled (gracefully or otherwise) when you close the listening socket. Maybe you could do some experiments.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
program to listen on TCP socket and start some program with I/O redirected to socket leniviy Linux - Software 4 08-12-2013 05:51 AM
Could not listen on UDP socket: address is in use. Marv Bon *BSD 10 08-29-2007 12:50 PM
Could not listen on UDP socket: address is in use. Marv Bon *BSD 1 08-26-2007 01:11 PM
Why server socket listen() is not listening seungtaeh Linux - Networking 1 03-09-2007 04:32 AM
could not listen on UDP socket: address in use peaceofcrap2001 Linux - Networking 2 07-10-2004 12:18 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration