C# Класс 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.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
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.

Приватные методы

Метод Описание
CheckConnected ( ) : void
ClearConnectionFields ( ) : void
WriteToken ( string token ) : void
readResponse ( ) : MpdResponse

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

Connect() публичный метод

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
Результат void

Connect() публичный метод

Connects to a MPD server.
public Connect ( IPEndPoint server ) : void
server System.Net.IPEndPoint The IPEndPoint of the server.
Результат void

Disconnect() публичный метод

Disconnects from the current MPD server.
public Disconnect ( ) : void
Результат void

Exec() публичный метод

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.
Результат MpdResponse

Exec() публичный метод

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.
Результат MpdResponse

Idle() публичный метод

Puts the client in idle mode for the given subsystems
public Idle ( Mpc subsystems ) : void
subsystems Mpc The subsystems to listen to.
Результат void

MpcConnection() публичный метод

Creates a new MpdConnection.
public MpcConnection ( ) : System
Результат System

MpcConnection() публичный метод

Creates a new MpdConnection.
public MpcConnection ( IPEndPoint server ) : System
server System.Net.IPEndPoint The IPEndPoint of the MPD server.
Результат System