MCPcopy Create free account
hub / github.com/TigerVNC/tigervnc / connect

Method connect

java/com/jcraft/jsch/ChannelDirectTCPIP.java:57–85  ·  view source on GitHub ↗
(int connectTimeout)

Source from the content-addressed store, hash-verified

55 }
56
57 public void connect(int connectTimeout) throws JSchException{
58 this.connectTimeout=connectTimeout;
59 try{
60 Session _session=getSession();
61 if(!_session.isConnected()){
62 throw new JSchException("session is down");
63 }
64
65 if(io.in!=null){
66 thread=new Thread(this);
67 thread.setName("DirectTCPIP thread "+_session.getHost());
68 if(_session.daemon_thread){
69 thread.setDaemon(_session.daemon_thread);
70 }
71 thread.start();
72 }
73 else {
74 sendChannelOpen();
75 }
76 }
77 catch(Exception e){
78 io.close();
79 io=null;
80 Channel.del(this);
81 if (e instanceof JSchException) {
82 throw (JSchException) e;
83 }
84 }
85 }
86
87 public void run(){
88

Callers 1

runMethod · 0.95

Calls 8

isConnectedMethod · 0.95
getHostMethod · 0.95
delMethod · 0.95
sendChannelOpenMethod · 0.80
closeMethod · 0.65
getSessionMethod · 0.45
setNameMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected