473,569 Members | 2,759 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

select() of poll()

13 New Member
I have some questions about select() and poll().
I heard the poll( ... ) call is usually preferred over and more efficient than select( ... ) simply because poll( ... ) only requires that you specify the handles you are interested in and can be quickly iterated thru by the system function call...
But if you have a VERY busy server and almost ALL handles are being used - then their efficiency should be about equivalent. and in a very few cases select( ) may actually beat poll( ) depending on the internal implementation. ..
Does it mean I should use select() when client number is large?

one drawback of select() is it only supports at most 1024 fd. Does it mean a server can set up at most 1024 connection to clients? but in my case, all 10k clients are able to set up connection with sever. How did it happen?
Feb 21 '08 #1
0 1597

Sign in to post your reply or Sign up for a free account.

Similar topics

1
2561
by: Magnus Lycka | last post by:
I'm trying to read standard out in a process started with popen2 in a non-blocking way. (Other good ways of doing this than the one I tried are appreciated.) I've tried to dumb down my code to see what happens, and socket.poll seems to behave very strangely. I've tried to use the .poll method for the poll object with and without a timeout,...
11
1859
by: Michi Henning | last post by:
Hi, I'm using a blocking Select() call on a socket with a timeout value of -1. I'd expect the call to block indefinitely, but it doesn't. When I use Poll() instead, a timeout of -1 works fine and blocks indefinitely. The net effect is that I cannot write a select on more than one file descripter if I want to block. (With timeout values...
5
7096
by: JamesHoward | last post by:
I have a problem with python's asyncore module throwing a bad file descriptor error. The code might be difficult to copy here, but the problem is essentially: The server wants to sever the connection of an open Asyncore socket. Calling the socket.close() nor the socket.shutdown(2) calls seem to work. The only way I can close the...
1
1515
by: John Pote | last post by:
Hi all, I have the standard Python 2.4.4 windows download installed on my win XP box. But the poll class in module select is not available. The docs indicate that it can work with windows as long as only sockets are used which is fine for me. Is there a reason it's not in the standard build, can I use it if I re compile the 'select'...
0
1892
by: Maxim Veksler | last post by:
Hi, I'm trying to write a non blocking socket port listener based on poll() because select is limited to 1024 fd. Here is the code, it never gets to "I did not block" until I do a telnet connection to port 10000. """ #!/usr/bin/env python
2
3049
by: inhahe | last post by:
select.poll isn't supported on Windows, because Windows doesn't have such a feature, or at least it didn't until Vista. Vista implements the same thing but called WSAPoll, an article is here http://blogs.msdn.com/wndp/archive/2006/10/26/WSAPoll.aspx I hope that the next edition of Python supports select.poll on Vista, or at least that...
1
2393
by: Jean-Paul Calderone | last post by:
On Tue, 6 May 2008 08:36:28 -0400, inhahe <inhahe@gmail.comwrote: If you use Twisted, then you can use I/O Completion Ports, which are even better than WSAPoll, and your code will also work with KQueue on BSD or EPoll on Linux without any changes. :) Jean-Paul
3
1648
by: shapper | last post by:
Hello, I have two tables: Polls and Options: Poll PollID, Question Options OptionID, PollID, Answer I want to select a Poll given its ID and all Options associated to it. Options should be converted to a CSV list ...
1
3033
by: shapper | last post by:
Hello, I have two tables: Polls PollID, Question Options OptionID, Answer Given a OptionID I want to get the poll to which the Option "Belongs": Poll poll = database.Polls.Select(p =p.Options.Select(o => o.OptionID = id)).SingleOrDefault;
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8122
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7673
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6284
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5513
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.