epoll Questions

1

Solved

Consider the following situation: you are deploying application that can serve 1 req./sec. What would happen if I send 10 request in 1 second? I wrote simple app to test that: https://github.com/am...
Alicaalicante asked 2/10, 2013 at 14:40

1

Solved

I'm playing around with Linux system call and I found some aspect of epoll, that is not clear to me. Say, I create a epoll instance: epollfd = epoll_create(50); Next, I register 50 file descript...
Orme asked 1/10, 2013 at 10:34

2

Solved

I'm using epoll to manage about 20 to 30 sockets. I figure out that epoll_wait can be used to wait for some data to arrive over one of the socket but I'm missing how do I implement timeouts on sock...
Communalize asked 27/5, 2012 at 6:56

2

Solved

The man page of epoll has a sample code for edge triggered like the following : for (;;) { nfds = epoll_wait(epollfd, events, MAX_EVENTS, -1); if (nfds == -1) { perror("epoll_pwait"); exit(EXI...
Inland asked 15/10, 2012 at 9:0

4

Solved

Is there a way to find out the errno when epoll_wait returns EPOLLERR for a particular fd? Is there any further information about the nature of the error? Edit: Adding more information to preven...
Larrisa asked 31/10, 2012 at 2:20

1

Solved

I would like to know what the difference is between both i/o watchers inotify and epoll? inotify inotify_init(void) creates inotify instance to read events from inotify_add_watch(int fd, const cha...
Punitive asked 20/6, 2013 at 7:34

2

Solved

1 #include <sys/epoll.h> 2 #include <stdio.h> 3 #include <sys/types.h> 4 #include <sys/stat.h> 5 #include <fcntl.h> 6 #include <string.h> 7 #include <s...
Gerah asked 9/4, 2011 at 7:48

1

Solved

From the manual of epoll_ctl: EPOLLRDHUP (since Linux 2.6.17) Stream socket peer closed connection, or shut down writing half of connection. (This flag is especially useful for writing simple...
Cog asked 10/5, 2013 at 0:36

4

Solved

What is Windows' best I/O event notification facility? By best I mean something that ... doesn't have a limit on number of input file descriptors works on all file descriptors (disk files, sock...
Valeryvalerye asked 15/9, 2008 at 21:20

2

Solved

I am implementing custom server that needs to maintain very large number (100K or more) of long lived connections. Server simply passes messages between sockets and it doesn't do any serious data p...
Hauger asked 25/2, 2013 at 18:11

4

Solved

How can you combine AIO and epoll together in a single event loop? Google finds lots of talk from 2002 and 2003 about unifying them, but its unclear if anything happened, or if it's possible. Has...
Igniter asked 1/12, 2009 at 11:38

1

Solved

I'm writing an application using epoll and large amount of fd's. in order to improve the searches of fd to application relevant DB, I want to pass to epoll application info, such as index in DB arr...
Urissa asked 25/12, 2012 at 6:52

1

Solved

I am running a fairly large-scale Node.js 0.8.8 app using Cluster with 16 worker processes on a 16-processor box with hyperthreading (so 32 logical cores). We are finding that since moving to the L...
Toback asked 7/12, 2012 at 20:55

1

I'm doing a technical write-up on switching from a database-polling (via synchronous stored procedure call) to a message queue (via pub/sub). I'd like to be able to explain how polling a database i...
Cullie asked 12/12, 2012 at 17:48

2

Solved

I thought I'd use Boost.Interprocess's Message Queue in place of sockets for communication within one host. But after digging into it, it seems that this library for some reason eschews the POSIX m...
Ephemeris asked 2/1, 2009 at 21:21

1

Solved

On a listening socket I set the EPOLLIN bit however on client connections I set EPOLLIN | EPOLLOUT bits to struct epoll_event like so: struct epoll_event ev; ev.data.fd = fd; ev.events = EPOLLIN ...
Merrill asked 26/11, 2012 at 16:22

2

Is there an equivalent of Linux epoll in Java? epoll allows a thread to react to a number of heterogenous events. For instance, I can have a thread that reacts to either a socket event or an input...
Jesseniajessey asked 16/5, 2012 at 15:29

2

Solved

I'm using epoll to get notifications about incoming data. It's not hard because all events returned by epoll_wait() indicates, that I can read data from epoll_event.data.fd (socket descriptor). Bu...
Ferde asked 3/10, 2012 at 16:37

1

Solved

I am having an increasingly hard time using the void *ptr in the epoll_event. I can just link this to a struct? For example, can I do something like this? Because I am trying todo something like th...
Brio asked 11/8, 2012 at 18:44

2

Solved

I am working with gpio interrupts. I have a file in "/sys/class/gpio/gpio38/value". I want a notification whenever there is a change in attribute value. So how can I achieve this in user-space. As ...
Bigamy asked 22/9, 2012 at 7:53

1

When I set my epoll option, I can see EPOLLPRI. It expalins there is urgent "read" required. When does this actually occur? Is there any way to send in that PRI Mode?
Fatherland asked 21/5, 2012 at 8:15

2

I am thinking of programming a tcp server based on epoll. To achieve the best performance i want to implement multi core support too. But during my researches the following question came up: Is it...
Pleistocene asked 18/9, 2012 at 16:33

1

Solved

I want to use the it_interval of newValue to set the interval of the timeout. But in my example, I can only print timeout once. What happened? How can I set the interval? This is my code: int ma...
Borodino asked 24/8, 2012 at 3:22

1

Solved

Just like the title says, it I register a file descriptor that is a directory with epoll, what does it do?
Blinker asked 6/8, 2012 at 17:36

1

Solved

I use epoll to build a server, this is the code where I init epoll : core->fd_epoll = epoll_create(LIMIT_CLIENT); ev.events = EPOLLIN | EPOLLPRI | EPOLLERR | EPOLLHUP; ev.data.fd = core->soc...
Epistemic asked 11/6, 2012 at 14:10

© 2022 - 2024 — McMap. All rights reserved.