Solved

Limit accepts in Winsock

Posted on 2004-09-09
3
261 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
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
This is about my first experience with programming Arduino.
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
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.

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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now