| Modifier and Type | Field and Description |
|---|---|
| public static final int | F_SETFD
Command to set the close-on-exec flag on a file descriptor via
|
| public static final int | FD_CLOEXEC
Specifies that a file descriptor shall not be inherited by child processes. |
| public static final String | LIBRARY_NAME
Library to load. |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: 0 on success; -1 otherwisefile descriptor of the socket, as returned by
fd, Sockets.socket(int, int, int)address to connect to addr,Length of addrLen)addr, use Structure#size()Connects a file descriptor, which must refer to a socket, to a
|
| public int | Returns: -1 on error, otherwise a value >= 0file descriptor to operate on fd, int set to command, int F_SETFDzero to clear the close-on-exec flag, flag)FD_CLOEXEC to
set itSimple binding to fcntl; used to set the FD_CLOEXEC flag. |
| public LibCAPI. | |
| public int | Returns: file descriptor for the socket; should be closed eventually, or -1 on error.socket domain; use domain, int Sockets#AF_UNIXsocket type; use type, int Sockets#SOCK_STREAMsocket communication protocol; use
protocol)Sockets#DEFAULT_PROTOCOL.Creates a socket and returns a file descriptor for it. |
| public LibCAPI. |
| F_SETFD | back to summary |
|---|---|
| public static final int F_SETFD Command to set the close-on-exec flag on a file descriptor via
| |
| FD_CLOEXEC | back to summary |
|---|---|
| public static final int FD_CLOEXEC Specifies that a file descriptor shall not be inherited by child processes. | |
| LIBRARY_NAME | back to summary |
|---|---|
| public static final String LIBRARY_NAME Library to load. These functions live in libc. | |
| connect | back to summary |
|---|---|
| public int connect(int fd, Sockets. Connects a file descriptor, which must refer to a socket, to a
| |
| fcntl | back to summary |
|---|---|
| public int fcntl(int fd, int command, int flag) throws LastErrorException Simple binding to fcntl; used to set the FD_CLOEXEC flag. On OS X, we cannot include SOCK_CLOEXEC in the socket() call.
| |
| read | back to summary |
|---|---|
| public LibCAPI. Read data from a file descriptor.
| |
| socket | back to summary |
|---|---|
| public int socket(int domain, int type, int protocol) throws LastErrorException Creates a socket and returns a file descriptor for it.
| |
| write | back to summary |
|---|---|
| public LibCAPI. Write data to a file descriptor.
| |