if (channel instanceof ServerSocketChannel) {
ServerSocket socket = ((ServerSocketChannel)channel).socket();
socket.bind(iaddr, backlog);
} else {
throw runtime.newErrnoENOPROTOOPTError();
}
} catch (UnknownHostException e) {
throw SocketUtils.sockerr(runtime, "bind(2): unknown host");