String localHostAddress = Utils.getLocalHostAddress();
if(localHostAddress == null) {
localHostAddress = "127.0.0.1";
}
serverSocket.bind(new InetSocketAddress(InetAddress.getByName(localHostAddress), 0));
NativeInterfaceListener nativeInterfaceListener = new NativeInterfaceAdapter() {
@Override
public void nativeInterfaceClosed() {
NativeInterface.removeNativeInterfaceListener(this);
try {
serverSocket.close();