/** * @return [0] = read end, [1] = write end */ public static FileDescriptor[] pipe() throws IOException { long res = newPipe(); if (res < 0) { throw newIOException("newPipe", (int) res); } return new FileDescriptor[]{new FileDescriptor((int) (res >>> 32)), new FileDescriptor((int) res)}; }
static FileDescriptor newKQueue() { return new FileDescriptor(kqueueCreate()); }
public static FileDescriptor newEventFd() { return new FileDescriptor(eventFd()); }
public static FileDescriptor newEpollCreate() { return new FileDescriptor(epollCreate()); }
public static FileDescriptor newTimerFd() { return new FileDescriptor(timerFd()); }
/** * @return [0] = read end, [1] = write end */ public static FileDescriptor[] pipe() throws IOException { long res = newPipe(); if (res < 0) { throw newIOException("newPipe", (int) res); } return new FileDescriptor[]{new FileDescriptor((int) (res >>> 32)), new FileDescriptor((int) res)}; }
public static FileDescriptor newTimerFd() { return new FileDescriptor(timerFd()); }
public static FileDescriptor newEpollCreate() { return new FileDescriptor(epollCreate()); }
static FileDescriptor newKQueue() { return new FileDescriptor(kqueueCreate()); }
public static FileDescriptor newEventFd() { return new FileDescriptor(eventFd()); }
/** * Open a new {@link FileDescriptor} for the given path. */ public static FileDescriptor from(String path) throws IOException { checkNotNull(path, "path"); int res = open(path); if (res < 0) { throw newIOException("open", res); } return new FileDescriptor(res); }
/** * Open a new {@link FileDescriptor} for the given path. */ public static FileDescriptor from(String path) throws IOException { checkNotNull(path, "path"); int res = open(path); if (res < 0) { throw newIOException("open", res); } return new FileDescriptor(res); }
allocHandle.incMessagesRead(1); readPending = false; pipeline.fireChannelRead(new FileDescriptor(recvFd)); break;
allocHandle.incMessagesRead(1); readPending = false; pipeline.fireChannelRead(new FileDescriptor(allocHandle.lastBytesRead())); break;
allocHandle.incMessagesRead(1); readPending = false; pipeline.fireChannelRead(new FileDescriptor(recvFd)); break;
allocHandle.incMessagesRead(1); readPending = false; pipeline.fireChannelRead(new FileDescriptor(allocHandle.lastBytesRead())); break;
/** * @return [0] = read end, [1] = write end */ public static FileDescriptor[] pipe() throws IOException { long res = newPipe(); if (res < 0) { throw newIOException("newPipe", (int) res); } return new FileDescriptor[]{new FileDescriptor((int) (res >>> 32)), new FileDescriptor((int) res)}; }
/** * Open a new {@link FileDescriptor} for the given path. */ public static FileDescriptor from(String path) throws IOException { checkNotNull(path, "path"); int res = open(path); if (res < 0) { throw newIOException("open", res); } return new FileDescriptor(res); }
/** * Open a new {@link FileDescriptor} for the given path. */ public static FileDescriptor from(String path) throws IOException { checkNotNull(path, "path"); int res = open(path); if (res < 0) { throw newIOException("open", res); } return new FileDescriptor(res); }
/** * Open a new {@link FileDescriptor} for the given path. */ public static FileDescriptor from(String path) throws IOException { checkNotNull(path, "path"); int res = open(path); if (res < 0) { throw newIOException("open", res); } return new FileDescriptor(res); }