server.stop();
}
private void createRequest(String host, int port, final SerialMsg msg) {
NettyClient client = NettyTransportProvider.createClient(host, port, this, new ConnectListener() {
@Override
public void onConnect(RemoteConnection connection) {
if (connection.getHost() != null) {
connection.write(msg);
}
}
});
client.start();
}