<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Client (libmpdclient.Mpd.Client)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> – <a href="../../index.html">libmpdclient</a> &#x00BB; <a href="../index.html">Mpd</a> &#x00BB; Client</nav><h1>Module <code>Mpd.Client</code></h1></header><aside><p>Provides functions and type in order to communicate to the mpd server with commands and requests.</p></aside><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type </span>t</code></dt><dd><p>Client type</p></dd></dl><dl><dt class="spec value" id="val-initialize"><a href="#val-initialize" class="anchor"></a><code><span class="keyword">val </span>initialize : <a href="../Connection/index.html#type-t">Connection.t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Initialize the client with a connection.</p></dd></dl><aside><p>val send: t -&gt; string -&gt; Protocol.response Send to the mpd server a command or a request. The response of the server is returned under the form of a Protocol.response type.</p></aside><dl><dt class="spec value" id="val-send_request"><a href="#val-send_request" class="anchor"></a><code><span class="keyword">val </span>send_request : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> string <span>&#45;&gt;</span> <a href="../Protocol/index.html#type-response">Protocol.response</a></code></dt><dt class="spec value" id="val-send_command"><a href="#val-send_command" class="anchor"></a><code><span class="keyword">val </span>send_command : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> string <span>&#45;&gt;</span> <a href="../Protocol/index.html#type-response">Protocol.response</a></code></dt><dt class="spec value" id="val-mpd_banner"><a href="#val-mpd_banner" class="anchor"></a><code><span class="keyword">val </span>mpd_banner : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> string</code></dt><dd><p>Return the mpd banner that the server send at the first connection of the client.</p></dd></dl><dl><dt class="spec value" id="val-status"><a href="#val-status" class="anchor"></a><code><span class="keyword">val </span>status : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> (<a href="../Status/index.html#type-t">Status.t</a>, string) Stdlib.result</code></dt><dd><p>Create a status request and returns the status under a Mpd.Status.t type if no error occurs.</p></dd></dl><dl><dt class="spec value" id="val-ping"><a href="#val-ping" class="anchor"></a><code><span class="keyword">val </span>ping : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="../Protocol/index.html#type-response">Protocol.response</a></code></dt><dd><p>Does nothing but return &quot;OK&quot;.</p></dd></dl><dl><dt class="spec value" id="val-password"><a href="#val-password" class="anchor"></a><code><span class="keyword">val </span>password : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> string <span>&#45;&gt;</span> <a href="../Protocol/index.html#type-response">Protocol.response</a></code></dt><dd><p>This is used for authentication with the server. PASSWORD is simply the plaintext password.</p></dd></dl><dl><dt class="spec value" id="val-close"><a href="#val-close" class="anchor"></a><code><span class="keyword">val </span>close : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit</code></dt><dd><p>Close the connection to MPD. MPD will try to send the remaining output buffer before it actually closes the connection, but that cannot be guaranteed. This command will not generate a response. This function is a wrapper to the &quot;close&quot; command of the Mpd protocol, this means that it first send the &quot;close&quot; command and it close the connection at the socket level.</p></dd></dl><dl><dt class="spec value" id="val-tagtypes"><a href="#val-tagtypes" class="anchor"></a><code><span class="keyword">val </span>tagtypes : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> string list</code></dt><dd><p>Show a list of available tag types. It is an intersection of the metadata_to_use setting and this client's tag mask. About the tag mask: each client can decide to disable any number of tag types, which will be omitted from responses to this client. That is a good idea, because it makes responses smaller. The following tagtypes sub commands configure this list.</p></dd></dl></div></body></html>