Solved

Limit accepts in Winsock

Posted on 2004-09-09
3
262 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
topping1 challenge 7 73
pairs challenge 5 64
Windows Batch File - Display current time and date in FOR command 8 67
C# Error - Add Failed 12 78
This article will show, step by step, how to integrate R code into a R Sweave document
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

910 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now