- java.lang.Object
-
- de.ibapl.jnhw.posix.Poll
-
@Include("#include <poll.h>") public final class Poll extends Object
Wrapper around the<poll.h>header. See specs at: poll.h - definitions for the poll() function.- Author:
- aploese
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPoll.PollFdPOSIX:structure pollfd.static classPoll.PollFdsPOSIX:structure pollfd.
-
Field Summary
Fields Modifier and Type Field Description static booleanHAVE_POLL_Hstatic shortPOLLERRPOSIX: An error has occurred (revents only).static shortPOLLHUPPOSIX: Device has been disconnected (revents only).static shortPOLLINPOSIX: Data other than high-priority data may be read without blocking.static shortPOLLNVALPOSIX: Invalid fd member (revents only).static shortPOLLOUTPOSIX: High priority data may be read without blocking.static shortPOLLPRIPOSIX: High priority data may be read without blocking.static shortPOLLRDBANDPOSIX: Normal data may be read without blocking.static shortPOLLRDNORMPOSIX: Normal data may be read without blocking.static shortPOLLWRBANDPOSIX: Priority data may be written.static shortPOLLWRNORMPOSIX: Equivalent to POLLOUT.
-
Constructor Summary
Constructors Constructor Description Poll()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intpoll(Poll.PollFd fd, int timeout)POSIX: poll - input/output multiplexing.static intpoll(Poll.PollFds fds, int timeout)POSIX: poll - input/output multiplexing.
-
-
-
Field Detail
-
HAVE_POLL_H
public static final boolean HAVE_POLL_H
-
POLLERR
@Define public static final short POLLERR
POSIX: An error has occurred (revents only).
-
POLLHUP
@Define public static final short POLLHUP
POSIX: Device has been disconnected (revents only).
-
POLLIN
@Define public static final short POLLIN
POSIX: Data other than high-priority data may be read without blocking.
-
POLLNVAL
@Define public static final short POLLNVAL
POSIX: Invalid fd member (revents only).
-
POLLOUT
@Define public static final short POLLOUT
POSIX: High priority data may be read without blocking.
-
POLLPRI
@Define public static final short POLLPRI
POSIX: High priority data may be read without blocking.
-
POLLRDBAND
@Define public static final short POLLRDBAND
POSIX: Normal data may be read without blocking.
-
POLLRDNORM
@Define public static final short POLLRDNORM
POSIX: Normal data may be read without blocking.
-
POLLWRBAND
@Define public static final short POLLWRBAND
POSIX: Priority data may be written.
-
POLLWRNORM
@Define public static final short POLLWRNORM
POSIX: Equivalent to POLLOUT.
-
-
Method Detail
-
poll
public static final int poll(Poll.PollFds fds, int timeout) throws NativeErrorException
POSIX: poll - input/output multiplexing.- Parameters:
fds- an array of pollfd.timeout- the timeout in milliseconds.- Returns:
- the native result.
- Throws:
NativeErrorException- if the return value of the native function indicates an error.
-
poll
public static final int poll(Poll.PollFd fd, int timeout) throws NativeErrorException
POSIX: poll - input/output multiplexing.- Parameters:
fd- a single pollfd.timeout- the timeout in milliseconds.- Returns:
- the native result.
- Throws:
NativeErrorException- if the return value of the native function indicates an error.
-
-