Search in sources :

Example 1 with TcpSocket

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());
    }
}
Also used : TcpSocket(com.tigervnc.network.TcpSocket) IOException(java.io.IOException) FileNotFoundException(java.io.FileNotFoundException) SocketException(java.net.SocketException) Exception(com.tigervnc.rfb.Exception)

Aggregations

TcpSocket (com.tigervnc.network.TcpSocket)1 Exception (com.tigervnc.rfb.Exception)1 FileNotFoundException (java.io.FileNotFoundException)1 IOException (java.io.IOException)1 SocketException (java.net.SocketException)1