*/
protected void doSocketConnect(InetAddress host, int port) throws IOException {
int timeout_ms = 3000; // timeout in milliseconds
if (RDPConnection.conf.http_mode && RDPConnection.conf.http_server != null) {
LocalHttpTunnel tunnel = new LocalHttpTunnel(RDPConnection.conf.http_server,
new InetSocketAddress(host, port),
RDPConnection.conf.username,
RDPConnection.conf.password,
RDPConnection.conf.command);
SocketAddress endpoint = tunnel.createTunnel();
if (endpoint != null) {
this.rdpsock = new Socket();
rdpsock.connect(endpoint, timeout_ms);
} else {
throw new IOException("failed to create tunnel!");