Example #1
0
 /**
  * Creates a new AdbStream object on the specified AdbConnection
  * with the given local ID.
  * @param adbConn AdbConnection that this stream is running on
  * @param localId Local ID of the stream
  */
 public AdbSessionBase(AdbConnection adbConn, uint localId)
 {
     this.adbConn    = adbConn;
     this.localId    = localId;
     this.readStream = new PipeStream();
     this.writeReady = false;
     this.isClosed   = false;
 }
Example #2
0
        /**
         * Creates a AdbConnection object associated with the socket and
         * crypto object specified.
         * @param socket The socket that the connection will use for communcation.
         * @param crypto The crypto object that stores the key pair for authentication.
         * @return A new AdbConnection object.
         */
        public static AdbConnection Create(TcpClient socket, AdbCrypto crypto)
        {
            /* Disable Nagle because we're sending tiny packets */
            socket.NoDelay = true;
            AdbConnection newConn = new AdbConnection(socket, crypto);


            return(newConn);
        }
Example #3
0
        public ShellSession(AdbConnection adbConnection, uint localId)
            : base(adbConnection, localId)
        {
            Thread thread = new Thread(Run)
            {
                IsBackground = true
            };

            thread.Start();
        }
Example #4
0
 public SyncSession(AdbConnection adbConn, uint localId) : base(adbConn, localId)
 {
 }