Lines Matching refs:fd
62 public PlainSocketImpl(FileDescriptor fd) {
63 this.fd = fd;
64 if (fd.valid()) {
78 public PlainSocketImpl(FileDescriptor fd, int localport, InetAddress addr, int port) {
79 this.fd = fd;
83 if (fd.valid()) {
98 FileDescriptor clientFd = Libcore.os.accept(fd, peerAddress);
100 // TODO: we can't just set newImpl.fd to clientFd because a nio SocketChannel may
102 newImpl.fd.setInt$(clientFd.getInt$());
116 newImpl.localport = IoBridge.getSocketLocalPort(newImpl.fd);
133 if (!fd.valid()) {
146 return IoBridge.available(fd);
150 IoBridge.bind(fd, address, port);
155 this.localport = IoBridge.getSocketLocalPort(fd);
162 IoBridge.closeSocket(fd);
192 IoBridge.connect(fd, normalAddr, aPort, timeout);
201 this.fd = IoBridge.socket(streaming);
245 return IoBridge.getSocketOption(fd, option);
281 Libcore.os.listen(fd, backlog);
289 IoBridge.setSocketOption(fd, option, value);
324 IoBridge.connect(fd, socksGetServerAddress(), socksGetServerPort(), timeout);
366 Libcore.os.shutdown(fd, SHUT_RD);
378 Libcore.os.shutdown(fd, SHUT_WR);
389 IoBridge.connect(fd, socksGetServerAddress(), socksGetServerPort());
471 Libcore.os.sendto(fd, buffer, 0, 1, MSG_OOB, null, 0);
488 int readCount = IoBridge.recvfrom(true, fd, buffer, offset, byteCount, 0, null, false);
507 int bytesWritten = IoBridge.sendto(fd, buffer, offset, byteCount, 0, null, 0);
515 IoBridge.sendto(fd, buffer, offset, byteCount, 0, address, port);