use of com.tigervnc.network.TcpSocket in project tigervnc by TigerVNC.
the class CConn method clientRedirect.
// clientRedirect() migrates the client to another host/port
public void clientRedirect(int port, String host, String x509subject) {
try {
sock.close();
sock = new TcpSocket(host, port);
vlog.info("Redirected to " + host + ":" + port);
setServerName(host);
setServerPort(port);
sock.inStream().setBlockCallback(this);
setStreams(sock.inStream(), sock.outStream());
if (desktop != null)
desktop.dispose();
initialiseProtocol();
} catch (java.lang.Exception e) {
throw new Exception(e.getMessage());
}
}
Aggregations