webvirtmgr/static/js/novnc/chrome-app/tcp-client.js
/**
   * Creates an instance of the client
   *
   * @param {String} host The remote host to connect to
   * @param {Number} port The port to connect to at the remote host
   */
Creates an instance of the client
@param {String} host The remote host to connect to
@param {Number} port The port to connect to at the remote host
Creates an instance of the client @param { String } host The remote host to connect to @param { Number } port The port to connect to at the remote host
function TcpClient(host, port, pollInterval) {
    this.host = host;
    this.port = port;
    this.pollInterval = pollInterval || 15;
    this.callbacks = {
      connect: null,    
      disconnect: null, 
      recvBuffer: null, 
      recvString: null, 
      sent: null        
    };
    this.socketId = null;
    this.isConnected = false;
    log('initialized tcp client');
  }
function TcpClient ( host , port , pollInterval ) { this . host = host ; this . port = port ; this . pollInterval = pollInterval || 15 ; this . callbacks = { connect : null , disconnect : null , recvBuffer : null , recvString : null , sent : null } ; this . socketId = null ; this . isConnected = false ; log ( 'initialized tcp client' ) ; }
Creates an instance of the client
 @param {String} host The remote host to connect to
 @param {Number} port The port to connect to at the remote host
Creates an instance of the client @param { String } host The remote host to connect to @param { Number } port The port to connect to at the remote host
// Callback functions. // Called when socket is connected. // Called when socket is disconnected. // Called (as ArrayBuffer) when client receives data from server. // Called (as string) when client receives data from server. // Called when client sends data to server. // Socket.