<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Mpd__Connection (libmpdclient.Mpd__Connection)</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; Mpd__Connection</nav><h1>Module <code>Mpd__Connection</code></h1><p>Offer functions and type in order to handle connections to the mpd server at the socket level.</p></header><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>connection 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 : string <span>&#45;&gt;</span> int <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>Create the connection, exit if the connection can not be initialized.</p></dd></dl><dl><dt class="spec value" id="val-hostname"><a href="#val-hostname" class="anchor"></a><code><span class="keyword">val </span>hostname : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> string</code></dt><dd><p>Retrieve the host's string of the initialized connection.</p></dd></dl><dl><dt class="spec value" id="val-port"><a href="#val-port" class="anchor"></a><code><span class="keyword">val </span>port : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> int</code></dt><dd><p>Retrieve the port of the connection of the initialized connection.</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</p></dd></dl><dl><dt class="spec value" id="val-write"><a href="#val-write" class="anchor"></a><code><span class="keyword">val </span>write : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> string <span>&#45;&gt;</span> unit</code></dt><dd><p>Write to an Mpd connection</p></dd></dl><aside><p>val read: t -&gt; string Read in an Mpd connection</p></aside><dl><dt class="spec value" id="val-read_mpd_banner"><a href="#val-read_mpd_banner" class="anchor"></a><code><span class="keyword">val </span>read_mpd_banner : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> string</code></dt><dd><p>Read in an Mpd connection</p></dd></dl><dl><dt class="spec value" id="val-read_request_response"><a href="#val-read_request_response" class="anchor"></a><code><span class="keyword">val </span>read_request_response : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> string</code></dt><dd><p>Read a Mpd response to a request.</p></dd></dl><dl><dt class="spec value" id="val-read_command_response"><a href="#val-read_command_response" class="anchor"></a><code><span class="keyword">val </span>read_command_response : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> string</code></dt><dd><p>Read a Mpd response to a command.</p></dd></dl></div></body></html>