1
0
mirror of https://github.com/ZetaKebab/MpcNET.git synced 2024-09-16 05:30:09 +00:00
Pure .NET Client Library for Music Player Daemon Servers.
Go to file
Gabriel Lucaci a44ae8da97 Update README.md
Connection section
2017-04-12 12:41:58 +02:00
src Renaming project folders 2017-04-12 12:11:27 +02:00
.gitignore Renaming project folders 2017-04-12 12:11:27 +02:00
.travis.yml Update .travis.yml 2017-04-12 12:15:38 +02:00
LICENSE Initial commit 2016-10-30 23:39:06 +01:00
README.md Update README.md 2017-04-12 12:41:58 +02:00

MpcNET

.NET Client Library for Music Player Daemon

Build Status

Installation

Usage

Connection

To create a client for MPD, you must first create a IPEndPoint for the Server with the right IP and Port.

var mpdEndpoint = new IPEndPoint(IPAddress.Loopback, 6600);

Then create a Client and Connect to MPD.

var client = new Mpc(mpdEndpoint);
var connected = await client.ConnectAsync();

The ConnectAsync() method is returning a bool to indicate if the connection was successfully. However, this can be queried directly on the Client also:

var isConnected = client.IsConnected;

and for MPD version, additional property is available:

var mpdVersion = client.Version

To disconnect the Client use the follow method:

await client.DisconnectAsync();

Send Command

API Content