protected void bind(int backlog, SocketAddress addr) throws IOException { if (!(addr instanceof AFUNIXSocketAddress)) { throw new SocketException("Cannot bind to this type of address: " + addr.getClass()); } final AFUNIXSocketAddress socketAddress = (AFUNIXSocketAddress) addr; socketFile = socketAddress.getSocketFile(); NativeUnixSocket.bind(socketFile, fd, backlog); bound = true; this.localport = socketAddress.getPort(); }
@Override protected void connect(SocketAddress addr, int timeout) throws IOException { if (!(addr instanceof AFUNIXSocketAddress)) { throw new SocketException("Cannot bind to this type of address: " + addr.getClass()); } final AFUNIXSocketAddress socketAddress = (AFUNIXSocketAddress) addr; socketFile = socketAddress.getSocketFile(); NativeUnixSocket.connect(socketFile, fd); this.address = socketAddress.getAddress(); this.port = socketAddress.getPort(); this.localport = 0; this.connected = true; }
@Override public String toString() { return getClass().getName() + "[host=" + getHostName() + ";port=" + getPort() + ";file=" + socketFile + "]"; } }
@Override public String toString() { return getClass().getName() + "[host=" + getHostName() + ";port=" + getPort() + ";file=" + socketFile + "]"; } }
protected void bind(int backlog, SocketAddress addr) throws IOException { if (!(addr instanceof AFUNIXSocketAddress)) { throw new SocketException("Cannot bind to this type of address: " + addr.getClass()); } final AFUNIXSocketAddress socketAddress = (AFUNIXSocketAddress) addr; socketFile = socketAddress.getSocketFile(); NativeUnixSocket.bind(socketFile, fd, backlog); bound = true; this.localport = socketAddress.getPort(); }
protected void bind(int backlog, SocketAddress addr) throws IOException { if (!(addr instanceof AFUNIXSocketAddress)) { throw new SocketException("Cannot bind to this type of address: " + addr.getClass()); } final AFUNIXSocketAddress socketAddress = (AFUNIXSocketAddress) addr; socketFile = socketAddress.getSocketFile(); NativeUnixSocket.bind(socketFile, fd, backlog); bound = true; this.localport = socketAddress.getPort(); }
protected void bind(int backlog, SocketAddress addr) throws IOException { if (!(addr instanceof AFUNIXSocketAddress)) { throw new SocketException("Cannot bind to this type of address: " + addr.getClass()); } final AFUNIXSocketAddress socketAddress = (AFUNIXSocketAddress) addr; socketFile = socketAddress.getSocketFile(); NativeUnixSocket.bind(socketFile, fd, backlog); validFdOrException(); bound = true; this.localport = socketAddress.getPort(); }
@Override protected void connect(SocketAddress addr, int timeout) throws IOException { if (!(addr instanceof AFUNIXSocketAddress)) { throw new SocketException("Cannot bind to this type of address: " + addr.getClass()); } final AFUNIXSocketAddress socketAddress = (AFUNIXSocketAddress) addr; socketFile = socketAddress.getSocketFile(); NativeUnixSocket.connect(socketFile, fd); this.address = socketAddress.getAddress(); this.port = socketAddress.getPort(); this.localport = 0; this.connected = true; }
@Override protected void connect(SocketAddress addr, int timeout) throws IOException { if (!(addr instanceof AFUNIXSocketAddress)) { throw new SocketException("Cannot bind to this type of address: " + addr.getClass()); } final AFUNIXSocketAddress socketAddress = (AFUNIXSocketAddress) addr; socketFile = socketAddress.getSocketFile(); NativeUnixSocket.connect(socketFile, fd); this.address = socketAddress.getAddress(); this.port = socketAddress.getPort(); this.localport = 0; this.connected = true; }
@Override protected void connect(SocketAddress addr, int timeout) throws IOException { if (!(addr instanceof AFUNIXSocketAddress)) { throw new SocketException("Cannot bind to this type of address: " + addr.getClass()); } final AFUNIXSocketAddress socketAddress = (AFUNIXSocketAddress) addr; socketFile = socketAddress.getSocketFile(); NativeUnixSocket.connect(validateSocketFile(socketFile), fd); validFdOrException(); this.address = socketAddress.getAddress(); this.port = socketAddress.getPort(); this.localport = 0; this.connected = true; }