Solved

Limit accepts in Winsock

Posted on 2004-09-09
3
264 Views
Last Modified: 2013-11-13
How do i limit the number of connections that my socket wud accept to one in winsock ?
0
Comment
Question by:shubha_mohan
3 Comments
 
LVL 19

Accepted Solution

by:
drichards earned 250 total points
ID: 12018486
Don't call accept more than once.  You can control the number of connection requests that Winsock will queue up (backlog param on 'listen'), but if you want to limit the number of connections accepted, then it is up to your code.  Once you accept a connection, just don't re-issue the call to accept until the first connection is gone, or never if you want one and only one connection to be accepted rather than just one at a time.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question