UnixServerSocket(UnixServerSocketChannel channel) { this.channel = channel; this.fd = channel.getFD(); }
UnixServerSocket(UnixServerSocketChannel channel) { this.channel = channel; this.fd = channel.getFD(); }
public UnixServerSocket() throws IOException { this.channel = new UnixServerSocketChannel(this); this.fd = channel.getFD(); }
public UnixServerSocket() throws IOException { this.channel = new UnixServerSocketChannel(this); this.fd = channel.getFD(); }
return unixFD; } else if (channel instanceof UnixServerSocketChannel) { ReflectiveAccess.FILE_DESCRIPTOR_FD.set(unixFD, ((UnixServerSocketChannel)channel).getFD()); return unixFD;
return unixFD; } else if (channel instanceof UnixServerSocketChannel) { ReflectiveAccess.FILE_DESCRIPTOR_FD.set(unixFD, ((UnixServerSocketChannel)channel).getFD()); return unixFD;
return unixFD; } else if (channel instanceof UnixServerSocketChannel) { FILE_DESCRIPTOR_FD.set(unixFD, ((UnixServerSocketChannel)channel).getFD()); return unixFD;
return unixFD; } else if (channel instanceof UnixServerSocketChannel) { FILE_DESCRIPTOR_FD.set(unixFD, ((UnixServerSocketChannel)channel).getFD()); return unixFD;
public UnixSocketChannel accept() throws IOException { UnixSocketAddress remote = new UnixSocketAddress(); SockAddrUnix addr = remote.getStruct(); IntByReference len = new IntByReference(addr.getMaximumLength()); int clientfd = Native.accept(getFD(), addr, len); if (clientfd < 0) { throw new IOException("accept failed: " + Native.getLastErrorString()); } // Always force the socket back to blocking mode Native.setBlocking(clientfd, true); return new UnixSocketChannel(clientfd, remote); }
public UnixSocketChannel accept() throws IOException { UnixSocketAddress remote = new UnixSocketAddress(); SockAddrUnix addr = remote.getStruct(); int maxLength = addr.getMaximumLength(); IntByReference len = new IntByReference(maxLength); int clientfd = Native.accept(getFD(), addr, len); if (clientfd < 0) { if (isBlocking()) { throw new IOException("accept failed: " + Native.getLastErrorString()); } return null; } // Handle unnamed sockets and sockets in Linux' abstract namespace addr.updatePath(len.getValue()); // Always force the socket back to blocking mode Native.setBlocking(clientfd, true); return new UnixSocketChannel(clientfd); }