C# Class Libmpc.MpcConnection

Keeps the connection to the MPD server and handels the most basic structure of the MPD protocol. The high level commands are handeled in the Libmpc.Mpc class.
Afficher le fichier Open project: sakya/wpfmpdclient Class Usage Examples

Méthodes publiques

Méthode Description
Connect ( ) : void

Connects to the MPD server who's IPEndPoint was set in the Server property.

Connect ( IPEndPoint server ) : void

Connects to a MPD server.

Disconnect ( ) : void

Disconnects from the current MPD server.

Exec ( string command ) : MpdResponse

Executes a simple command without arguments on the MPD server and returns the response.

Exec ( string command, string argument ) : MpdResponse

Executes a MPD command with arguments on the MPD server.

Idle ( Mpc subsystems ) : void

Puts the client in idle mode for the given subsystems

MpcConnection ( ) : System

Creates a new MpdConnection.

MpcConnection ( IPEndPoint server ) : System

Creates a new MpdConnection.

Private Methods

Méthode Description
CheckConnected ( ) : void
ClearConnectionFields ( ) : void
WriteToken ( string token ) : void
readResponse ( ) : MpdResponse

Method Details

Connect() public méthode

Connects to the MPD server who's IPEndPoint was set in the Server property.
If no IPEndPoint was set to the Server property.
public Connect ( ) : void
Résultat void

Connect() public méthode

Connects to a MPD server.
public Connect ( IPEndPoint server ) : void
server System.Net.IPEndPoint The IPEndPoint of the server.
Résultat void

Disconnect() public méthode

Disconnects from the current MPD server.
public Disconnect ( ) : void
Résultat void

Exec() public méthode

Executes a simple command without arguments on the MPD server and returns the response.
If the command contains a space of a newline charakter.
public Exec ( string command ) : MpdResponse
command string The command to execute.
Résultat MpdResponse

Exec() public méthode

Executes a MPD command with arguments on the MPD server.
If the command contains a space of a newline charakter.
public Exec ( string command, string argument ) : MpdResponse
command string The command to execute.
argument string The arguments of the command.
Résultat MpdResponse

Idle() public méthode

Puts the client in idle mode for the given subsystems
public Idle ( Mpc subsystems ) : void
subsystems Mpc The subsystems to listen to.
Résultat void

MpcConnection() public méthode

Creates a new MpdConnection.
public MpcConnection ( ) : System
Résultat System

MpcConnection() public méthode

Creates a new MpdConnection.
public MpcConnection ( IPEndPoint server ) : System
server System.Net.IPEndPoint The IPEndPoint of the MPD server.
Résultat System