C# Class 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 .

Inheritance: IAdbSocket, IDisposable
Afficher le fichier Open project: ArduPilot/MissionPlanner

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
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.

Method Details

AdbSocket() public méthode

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. ///
Résultat Exceptions

AdbSocket() public méthode

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. ///
Résultat Exceptions

Close() public méthode

public Close ( ) : void
Résultat void

Dispose() public méthode

Releases all resources used by the current instance of the AdbSocket class.
public Dispose ( ) : void
Résultat void

GetShellStream() public méthode

public GetShellStream ( ) : Stream
Résultat Stream

IsOkay() public static méthode

Determines whether the specified reply is okay.
public static IsOkay ( byte reply ) : bool
reply byte The reply.
Résultat bool

Read() public méthode

public Read ( byte data ) : void
data byte
Résultat void

Read() public méthode

public Read ( byte data, int length ) : void
data byte
length int
Résultat void

ReadAdbResponse() public méthode

public ReadAdbResponse ( ) : SharpAdbClient.AdbResponse
Résultat SharpAdbClient.AdbResponse

ReadAdbResponseInner() protected méthode

Reads the response from ADB after a command.
protected ReadAdbResponseInner ( ) : SharpAdbClient.AdbResponse
Résultat SharpAdbClient.AdbResponse

ReadString() public méthode

public ReadString ( ) : string
Résultat string

ReadSyncLength() public méthode

public ReadSyncLength ( ) : int
Résultat int

ReadSyncResponse() public méthode

public ReadSyncResponse ( ) : SyncCommand
Résultat SyncCommand

ReadSyncString() public méthode

public ReadSyncString ( int length ) : string
length int
Résultat string

Reconnect() public méthode

public Reconnect ( ) : void
Résultat void

ReplyToString() protected méthode

Converts an ADB reply to a string.
protected ReplyToString ( byte reply ) : string
reply byte /// A array that represents the ADB reply. ///
Résultat string

Send() public méthode

public Send ( byte data, int length ) : void
data byte
length int
Résultat void

SendAdbRequest() public méthode

public SendAdbRequest ( string request ) : void
request string
Résultat void

SendSyncRequest() public méthode

public SendSyncRequest ( SyncCommand command, int length ) : void
command SyncCommand
length int
Résultat void

SendSyncRequest() public méthode

public SendSyncRequest ( SyncCommand command, string path ) : void
command SyncCommand
path string
Résultat void

SendSyncRequest() public méthode

public SendSyncRequest ( SyncCommand command, string path, int permissions ) : void
command SyncCommand
path string
permissions int
Résultat void

Write() protected méthode

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.
Résultat bool