@Override public String toString() { if (!isBound()) { return "AFUNIXServerSocket[unbound]"; } return "AFUNIXServerSocket[" + boundEndpoint.getSocketFile() + "]"; }
@Override public String toString() { if (!isBound()) { return "AFUNIXServerSocket[unbound]"; } return "AFUNIXServerSocket[" + boundEndpoint.getSocketFile() + "]"; }
@Override public void bind(SocketAddress endpoint, int backlog) throws IOException { if (isClosed()) { throw new SocketException("Socket is closed"); } if (isBound()) { throw new SocketException("Already bound"); } if (!(endpoint instanceof AFUNIXSocketAddress)) { throw new IOException("Can only bind to endpoints of type " + AFUNIXSocketAddress.class .getName()); } implementation.bind(backlog, endpoint); boundEndpoint = (AFUNIXSocketAddress) endpoint; }
@Override public void bind(SocketAddress endpoint, int backlog) throws IOException { if (isClosed()) { throw new SocketException("Socket is closed"); } if (isBound()) { throw new SocketException("Already bound"); } if (!(endpoint instanceof AFUNIXSocketAddress)) { throw new IOException("Can only bind to endpoints of type " + AFUNIXSocketAddress.class.getName()); } implementation.bind(backlog, endpoint); boundEndpoint = (AFUNIXSocketAddress) endpoint; }