C# Класс SharpAdbClient.AdbSocket

Implements a client for the Android Debug Bridge client-server protocol. Using the client, you can send messages to and receive messages from the Android Debug Bridge.

The AdbSocket class implements the raw messaging protocol; that is, sending and receiving messages. For interacting with the services the Android Debug Bridge exposes, use the AdbClient.

For more information about the protocol that is implemented here, see chapter II Protocol Details, section 1. Client <->Server protocol at .

Наследование: IAdbSocket, IDisposable
Показать файл Открыть проект

Открытые методы

Метод Описание
AdbSocket ( EndPoint endPoint ) : Exceptions

Initializes a new instance of the AdbSocket class.

AdbSocket ( ITcpSocket socket ) : Exceptions

Initializes a new instance of the AdbSocket class.

Close ( ) : void
Dispose ( ) : void

Releases all resources used by the current instance of the AdbSocket class.

GetShellStream ( ) : Stream
IsOkay ( byte reply ) : bool

Determines whether the specified reply is okay.

Read ( byte data ) : void
Read ( byte data, int length ) : void
ReadAdbResponse ( ) : SharpAdbClient.AdbResponse
ReadString ( ) : string
ReadSyncLength ( ) : int
ReadSyncResponse ( ) : SyncCommand
ReadSyncString ( int length ) : string
Reconnect ( ) : void
Send ( byte data, int length ) : void
SendAdbRequest ( string request ) : void
SendSyncRequest ( SyncCommand command, int length ) : void
SendSyncRequest ( SyncCommand command, string path ) : void
SendSyncRequest ( SyncCommand command, string path, int permissions ) : void

Защищенные методы

Метод Описание
ReadAdbResponseInner ( ) : SharpAdbClient.AdbResponse

Reads the response from ADB after a command.

ReplyToString ( byte reply ) : string

Converts an ADB reply to a string.

Write ( byte data ) : bool

Write until all data in "data" is written or the connection fails or times out.

This uses the default time out value.

Описание методов

AdbSocket() публичный Метод

Initializes a new instance of the AdbSocket class.
public AdbSocket ( EndPoint endPoint ) : Exceptions
endPoint System.Net.EndPoint /// The at which the Android Debug Bridge is listening /// for clients. ///
Результат Exceptions

AdbSocket() публичный Метод

Initializes a new instance of the AdbSocket class.
public AdbSocket ( ITcpSocket socket ) : Exceptions
socket ITcpSocket /// The at which the Android Debug Bridge is listening /// for clients. ///
Результат Exceptions

Close() публичный Метод

public Close ( ) : void
Результат void

Dispose() публичный Метод

Releases all resources used by the current instance of the AdbSocket class.
public Dispose ( ) : void
Результат void

GetShellStream() публичный Метод

public GetShellStream ( ) : Stream
Результат Stream

IsOkay() публичный статический Метод

Determines whether the specified reply is okay.
public static IsOkay ( byte reply ) : bool
reply byte The reply.
Результат bool

Read() публичный Метод

public Read ( byte data ) : void
data byte
Результат void

Read() публичный Метод

public Read ( byte data, int length ) : void
data byte
length int
Результат void

ReadAdbResponse() публичный Метод

public ReadAdbResponse ( ) : SharpAdbClient.AdbResponse
Результат SharpAdbClient.AdbResponse

ReadAdbResponseInner() защищенный Метод

Reads the response from ADB after a command.
protected ReadAdbResponseInner ( ) : SharpAdbClient.AdbResponse
Результат SharpAdbClient.AdbResponse

ReadString() публичный Метод

public ReadString ( ) : string
Результат string

ReadSyncLength() публичный Метод

public ReadSyncLength ( ) : int
Результат int

ReadSyncResponse() публичный Метод

public ReadSyncResponse ( ) : SyncCommand
Результат SyncCommand

ReadSyncString() публичный Метод

public ReadSyncString ( int length ) : string
length int
Результат string

Reconnect() публичный Метод

public Reconnect ( ) : void
Результат void

ReplyToString() защищенный Метод

Converts an ADB reply to a string.
protected ReplyToString ( byte reply ) : string
reply byte /// A array that represents the ADB reply. ///
Результат string

Send() публичный Метод

public Send ( byte data, int length ) : void
data byte
length int
Результат void

SendAdbRequest() публичный Метод

public SendAdbRequest ( string request ) : void
request string
Результат void

SendSyncRequest() публичный Метод

public SendSyncRequest ( SyncCommand command, int length ) : void
command SyncCommand
length int
Результат void

SendSyncRequest() публичный Метод

public SendSyncRequest ( SyncCommand command, string path ) : void
command SyncCommand
path string
Результат void

SendSyncRequest() публичный Метод

public SendSyncRequest ( SyncCommand command, string path, int permissions ) : void
command SyncCommand
path string
permissions int
Результат void

Write() защищенный Метод

Write until all data in "data" is written or the connection fails or times out.
This uses the default time out value.
protected Write ( byte data ) : bool
data byte The data to send.
Результат bool