This file is indexed.

/usr/share/doc/libghc-dbus-doc/html/DBus-Socket.html is in libghc-dbus-doc 0.10.13-1build3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>DBus.Socket</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="file:///usr/share/javascript/mathjax/MathJax.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_DBus-Socket.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/DBus-Socket.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">dbus-0.10.13: A client library for the D-Bus IPC system.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">DBus.Socket</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Sockets</a></li><li><a href="#g:2">Socket errors</a></li><li><a href="#g:3">Socket options</a></li><li><a href="#g:4">Opening and closing sockets</a></li><li><a href="#g:5">Listening for connections</a></li><li><a href="#g:6">Authentication</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>D-Bus sockets are used for communication between two peers. In this model,
 there is no &quot;bus&quot; or &quot;client&quot;, simply two endpoints sending messages.</p><p>Most users will want to use the <a href="DBus-Client.html">DBus.Client</a> module instead.</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:Socket">Socket</a></li><li class="src short"><a href="#v:send">send</a> :: <a href="DBus-Internal-Message.html#t:Message">Message</a> msg =&gt; <a href="DBus-Socket.html#t:Socket">Socket</a> -&gt; msg -&gt; (<a href="DBus-Internal-Types.html#t:Serial">Serial</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:receive">receive</a> :: <a href="DBus-Socket.html#t:Socket">Socket</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="DBus-Internal-Message.html#t:ReceivedMessage">ReceivedMessage</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:SocketError">SocketError</a></li><li class="src short"><a href="#v:socketError">socketError</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -&gt; <a href="DBus-Socket.html#t:SocketError">SocketError</a></li><li class="src short"><a href="#v:socketErrorMessage">socketErrorMessage</a> :: <a href="DBus-Socket.html#t:SocketError">SocketError</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:socketErrorFatal">socketErrorFatal</a> :: <a href="DBus-Socket.html#t:SocketError">SocketError</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:socketErrorAddress">socketErrorAddress</a> :: <a href="DBus-Socket.html#t:SocketError">SocketError</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="DBus-Internal-Address.html#t:Address">Address</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:SocketOptions">SocketOptions</a> t</li><li class="src short"><a href="#v:socketAuthenticator">socketAuthenticator</a> :: <a href="DBus-Socket.html#t:SocketOptions">SocketOptions</a> t -&gt; <a href="DBus-Socket.html#t:Authenticator">Authenticator</a> t</li><li class="src short"><a href="#v:socketTransportOptions">socketTransportOptions</a> :: <a href="DBus-Socket.html#t:SocketOptions">SocketOptions</a> t -&gt; <a href="DBus-Transport.html#t:TransportOptions">TransportOptions</a> t</li><li class="src short"><a href="#v:defaultSocketOptions">defaultSocketOptions</a> :: <a href="DBus-Socket.html#t:SocketOptions">SocketOptions</a> <a href="DBus-Transport.html#t:SocketTransport">SocketTransport</a></li><li class="src short"><a href="#v:open">open</a> :: <a href="DBus-Internal-Address.html#t:Address">Address</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="DBus-Socket.html#t:Socket">Socket</a></li><li class="src short"><a href="#v:openWith">openWith</a> :: <a href="DBus-Transport.html#t:TransportOpen">TransportOpen</a> t =&gt; <a href="DBus-Socket.html#t:SocketOptions">SocketOptions</a> t -&gt; <a href="DBus-Internal-Address.html#t:Address">Address</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="DBus-Socket.html#t:Socket">Socket</a></li><li class="src short"><a href="#v:close">close</a> :: <a href="DBus-Socket.html#t:Socket">Socket</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><span class="keyword">data</span> <a href="#t:SocketListener">SocketListener</a></li><li class="src short"><a href="#v:listen">listen</a> :: <a href="DBus-Internal-Address.html#t:Address">Address</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="DBus-Socket.html#t:SocketListener">SocketListener</a></li><li class="src short"><a href="#v:listenWith">listenWith</a> :: <a href="DBus-Transport.html#t:TransportListen">TransportListen</a> t =&gt; <a href="DBus-Socket.html#t:SocketOptions">SocketOptions</a> t -&gt; <a href="DBus-Internal-Address.html#t:Address">Address</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="DBus-Socket.html#t:SocketListener">SocketListener</a></li><li class="src short"><a href="#v:accept">accept</a> :: <a href="DBus-Socket.html#t:SocketListener">SocketListener</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="DBus-Socket.html#t:Socket">Socket</a></li><li class="src short"><a href="#v:closeListener">closeListener</a> :: <a href="DBus-Socket.html#t:SocketListener">SocketListener</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:socketListenerAddress">socketListenerAddress</a> :: <a href="DBus-Socket.html#t:SocketListener">SocketListener</a> -&gt; <a href="DBus-Internal-Address.html#t:Address">Address</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:Authenticator">Authenticator</a> t</li><li class="src short"><a href="#v:authenticator">authenticator</a> :: <a href="DBus-Socket.html#t:Authenticator">Authenticator</a> t</li><li class="src short"><a href="#v:authenticatorClient">authenticatorClient</a> :: <a href="DBus-Socket.html#t:Authenticator">Authenticator</a> t -&gt; t -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:authenticatorServer">authenticatorServer</a> :: <a href="DBus-Socket.html#t:Authenticator">Authenticator</a> t -&gt; t -&gt; <a href="DBus.html#t:UUID">UUID</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li></ul></div><div id="interface"><h1 id="g:1">Sockets</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Socket" class="def">Socket</a> <a href="src/DBus-Socket.html#Socket" class="link">Source</a> <a href="#t:Socket" class="selflink">#</a></p><div class="doc"><p>An open socket to another process. Messages can be sent to the remote
 peer using <code><a href="DBus-Socket.html#v:send">send</a></code>, or received using <code><a href="DBus-Socket.html#v:receive">receive</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:send" class="def">send</a> :: <a href="DBus-Internal-Message.html#t:Message">Message</a> msg =&gt; <a href="DBus-Socket.html#t:Socket">Socket</a> -&gt; msg -&gt; (<a href="DBus-Internal-Types.html#t:Serial">Serial</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> a <a href="src/DBus-Socket.html#send" class="link">Source</a> <a href="#v:send" class="selflink">#</a></p><div class="doc"><p>Send a single message, with a generated <code><a href="DBus-Internal-Types.html#t:Serial">Serial</a></code>. The second parameter
 exists to prevent race conditions when registering a reply handler; it
 receives the serial the message <em>will</em> be sent with, before it's
 actually sent.</p><p>Sockets are thread-safe. Only one message may be sent at a time; if
 multiple threads attempt to send messages concurrently, one will block
 until after the other has finished.</p><p>Throws <code><a href="DBus-Socket.html#t:SocketError">SocketError</a></code> on failure.</p></div></div><div class="top"><p class="src"><a id="v:receive" class="def">receive</a> :: <a href="DBus-Socket.html#t:Socket">Socket</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="DBus-Internal-Message.html#t:ReceivedMessage">ReceivedMessage</a> <a href="src/DBus-Socket.html#receive" class="link">Source</a> <a href="#v:receive" class="selflink">#</a></p><div class="doc"><p>Receive the next message from the socket , blocking until one is available.</p><p>Sockets are thread-safe. Only one message may be received at a time; if
 multiple threads attempt to receive messages concurrently, one will block
 until after the other has finished.</p><p>Throws <code><a href="DBus-Socket.html#t:SocketError">SocketError</a></code> on failure.</p></div></div><h1 id="g:2">Socket errors</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:SocketError" class="def">SocketError</a> <a href="src/DBus-Socket.html#SocketError" class="link">Source</a> <a href="#t:SocketError" class="selflink">#</a></p><div class="doc"><p>Stores information about an error encountered while creating or using a
 <code><a href="DBus-Socket.html#t:Socket">Socket</a></code>.</p></div><div class="subs instances"><p id="control.i:SocketError" class="caption collapser" onclick="toggleSection('i:SocketError')">Instances</p><div id="section.i:SocketError" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SocketError:Eq:1" class="instance expander" onclick="toggleSection('i:id:SocketError:Eq:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="DBus-Socket.html#t:SocketError">SocketError</a></span> <a href="src/DBus-Socket.html#line-90" class="link">Source</a> <a href="#t:SocketError" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:SocketError:Eq:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="DBus-Socket.html#t:SocketError">SocketError</a> -&gt; <a href="DBus-Socket.html#t:SocketError">SocketError</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="DBus-Socket.html#t:SocketError">SocketError</a> -&gt; <a href="DBus-Socket.html#t:SocketError">SocketError</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SocketError:Show:2" class="instance expander" onclick="toggleSection('i:id:SocketError:Show:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> <a href="DBus-Socket.html#t:SocketError">SocketError</a></span> <a href="src/DBus-Socket.html#line-90" class="link">Source</a> <a href="#t:SocketError" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:SocketError:Show:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="DBus-Socket.html#t:SocketError">SocketError</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="DBus-Socket.html#t:SocketError">SocketError</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="DBus-Socket.html#t:SocketError">SocketError</a>] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SocketError:Exception:3" class="instance expander" onclick="toggleSection('i:id:SocketError:Exception:3')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception-Base.html#t:Exception">Exception</a> <a href="DBus-Socket.html#t:SocketError">SocketError</a></span> <a href="src/DBus-Socket.html#line-92" class="link">Source</a> <a href="#t:SocketError" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:SocketError:Exception:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:toException">toException</a> :: <a href="DBus-Socket.html#t:SocketError">SocketError</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception-Base.html#t:SomeException">SomeException</a> <a href="#v:toException" class="selflink">#</a></p><p class="src"><a href="#v:fromException">fromException</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception-Base.html#t:SomeException">SomeException</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="DBus-Socket.html#t:SocketError">SocketError</a> <a href="#v:fromException" class="selflink">#</a></p><p class="src"><a href="#v:displayException">displayException</a> :: <a href="DBus-Socket.html#t:SocketError">SocketError</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:displayException" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:socketError" class="def">socketError</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -&gt; <a href="DBus-Socket.html#t:SocketError">SocketError</a> <a href="src/DBus-Socket.html#socketError" class="link">Source</a> <a href="#v:socketError" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:socketErrorMessage" class="def">socketErrorMessage</a> :: <a href="DBus-Socket.html#t:SocketError">SocketError</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="src/DBus-Socket.html#socketErrorMessage" class="link">Source</a> <a href="#v:socketErrorMessage" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:socketErrorFatal" class="def">socketErrorFatal</a> :: <a href="DBus-Socket.html#t:SocketError">SocketError</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/DBus-Socket.html#socketErrorFatal" class="link">Source</a> <a href="#v:socketErrorFatal" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:socketErrorAddress" class="def">socketErrorAddress</a> :: <a href="DBus-Socket.html#t:SocketError">SocketError</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="DBus-Internal-Address.html#t:Address">Address</a> <a href="src/DBus-Socket.html#socketErrorAddress" class="link">Source</a> <a href="#v:socketErrorAddress" class="selflink">#</a></p></div><h1 id="g:3">Socket options</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:SocketOptions" class="def">SocketOptions</a> t <a href="src/DBus-Socket.html#SocketOptions" class="link">Source</a> <a href="#t:SocketOptions" class="selflink">#</a></p><div class="doc"><p>Used with <code><a href="DBus-Socket.html#v:openWith">openWith</a></code> and <code><a href="DBus-Socket.html#v:listenWith">listenWith</a></code> to provide custom authenticators or
 transport options.</p></div></div><div class="top"><p class="src"><a id="v:socketAuthenticator" class="def">socketAuthenticator</a> :: <a href="DBus-Socket.html#t:SocketOptions">SocketOptions</a> t -&gt; <a href="DBus-Socket.html#t:Authenticator">Authenticator</a> t <a href="src/DBus-Socket.html#socketAuthenticator" class="link">Source</a> <a href="#v:socketAuthenticator" class="selflink">#</a></p><div class="doc"><p>Used to perform authentication with the remote peer. After a
 transport has been opened, it will be passed to the authenticator.
 If the authenticator returns true, then the socket was
 authenticated.</p></div></div><div class="top"><p class="src"><a id="v:socketTransportOptions" class="def">socketTransportOptions</a> :: <a href="DBus-Socket.html#t:SocketOptions">SocketOptions</a> t -&gt; <a href="DBus-Transport.html#t:TransportOptions">TransportOptions</a> t <a href="src/DBus-Socket.html#socketTransportOptions" class="link">Source</a> <a href="#v:socketTransportOptions" class="selflink">#</a></p><div class="doc"><p>Options for the underlying transport, to be used by custom transports
 for controlling how to connect to the remote peer.</p><p>See <a href="DBus-Transport.html">DBus.Transport</a> for details on defining custom transports</p></div></div><div class="top"><p class="src"><a id="v:defaultSocketOptions" class="def">defaultSocketOptions</a> :: <a href="DBus-Socket.html#t:SocketOptions">SocketOptions</a> <a href="DBus-Transport.html#t:SocketTransport">SocketTransport</a> <a href="src/DBus-Socket.html#defaultSocketOptions" class="link">Source</a> <a href="#v:defaultSocketOptions" class="selflink">#</a></p><div class="doc"><p>Default <code><a href="DBus-Socket.html#t:SocketOptions">SocketOptions</a></code>, which uses the default Unix/TCP transport and
 authenticator.</p></div></div><h1 id="g:4">Opening and closing sockets</h1><div class="top"><p class="src"><a id="v:open" class="def">open</a> :: <a href="DBus-Internal-Address.html#t:Address">Address</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="DBus-Socket.html#t:Socket">Socket</a> <a href="src/DBus-Socket.html#open" class="link">Source</a> <a href="#v:open" class="selflink">#</a></p><div class="doc"><p>Open a socket to a remote peer listening at the given address.</p><pre>open = <code><a href="DBus-Socket.html#v:openWith">openWith</a></code> <code><a href="DBus-Socket.html#v:defaultSocketOptions">defaultSocketOptions</a></code>
 </pre><p>Throws <code><a href="DBus-Socket.html#t:SocketError">SocketError</a></code> on failure.</p></div></div><div class="top"><p class="src"><a id="v:openWith" class="def">openWith</a> :: <a href="DBus-Transport.html#t:TransportOpen">TransportOpen</a> t =&gt; <a href="DBus-Socket.html#t:SocketOptions">SocketOptions</a> t -&gt; <a href="DBus-Internal-Address.html#t:Address">Address</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="DBus-Socket.html#t:Socket">Socket</a> <a href="src/DBus-Socket.html#openWith" class="link">Source</a> <a href="#v:openWith" class="selflink">#</a></p><div class="doc"><p>Open a socket to a remote peer listening at the given address.</p><p>Most users should use <code><a href="DBus-Socket.html#v:open">open</a></code>. This function is for users who need to define
 custom authenticators or transports.</p><p>Throws <code><a href="DBus-Socket.html#t:SocketError">SocketError</a></code> on failure.</p></div></div><div class="top"><p class="src"><a id="v:close" class="def">close</a> :: <a href="DBus-Socket.html#t:Socket">Socket</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/DBus-Socket.html#close" class="link">Source</a> <a href="#v:close" class="selflink">#</a></p><div class="doc"><p>Close an open <code><a href="DBus-Socket.html#t:Socket">Socket</a></code>. Once closed, the socket is no longer valid and
 must not be used.</p></div></div><h1 id="g:5">Listening for connections</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:SocketListener" class="def">SocketListener</a> <a href="src/DBus-Socket.html#SocketListener" class="link">Source</a> <a href="#t:SocketListener" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:listen" class="def">listen</a> :: <a href="DBus-Internal-Address.html#t:Address">Address</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="DBus-Socket.html#t:SocketListener">SocketListener</a> <a href="src/DBus-Socket.html#listen" class="link">Source</a> <a href="#v:listen" class="selflink">#</a></p><div class="doc"><p>Begin listening at the given address.</p><p>Use <code><a href="DBus-Socket.html#v:accept">accept</a></code> to create sockets from incoming connections.</p><p>Use <code><a href="DBus-Socket.html#v:closeListener">closeListener</a></code> to stop listening, and to free underlying transport
 resources such as file descriptors.</p><p>Throws <code><a href="DBus-Socket.html#t:SocketError">SocketError</a></code> on failure.</p></div></div><div class="top"><p class="src"><a id="v:listenWith" class="def">listenWith</a> :: <a href="DBus-Transport.html#t:TransportListen">TransportListen</a> t =&gt; <a href="DBus-Socket.html#t:SocketOptions">SocketOptions</a> t -&gt; <a href="DBus-Internal-Address.html#t:Address">Address</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="DBus-Socket.html#t:SocketListener">SocketListener</a> <a href="src/DBus-Socket.html#listenWith" class="link">Source</a> <a href="#v:listenWith" class="selflink">#</a></p><div class="doc"><p>Begin listening at the given address.</p><p>Use <code><a href="DBus-Socket.html#v:accept">accept</a></code> to create sockets from incoming connections.</p><p>Use <code><a href="DBus-Socket.html#v:closeListener">closeListener</a></code> to stop listening, and to free underlying transport
 resources such as file descriptors.</p><p>This function is for users who need to define custom authenticators
 or transports.</p><p>Throws <code><a href="DBus-Socket.html#t:SocketError">SocketError</a></code> on failure.</p></div></div><div class="top"><p class="src"><a id="v:accept" class="def">accept</a> :: <a href="DBus-Socket.html#t:SocketListener">SocketListener</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="DBus-Socket.html#t:Socket">Socket</a> <a href="src/DBus-Socket.html#accept" class="link">Source</a> <a href="#v:accept" class="selflink">#</a></p><div class="doc"><p>Accept a new connection from a socket listener.</p><p>Throws <code><a href="DBus-Socket.html#t:SocketError">SocketError</a></code> on failure.</p></div></div><div class="top"><p class="src"><a id="v:closeListener" class="def">closeListener</a> :: <a href="DBus-Socket.html#t:SocketListener">SocketListener</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/DBus-Socket.html#closeListener" class="link">Source</a> <a href="#v:closeListener" class="selflink">#</a></p><div class="doc"><p>Close an open <code><a href="DBus-Socket.html#t:SocketListener">SocketListener</a></code>. Once closed, the listener is no longer
 valid and must not be used.</p></div></div><div class="top"><p class="src"><a id="v:socketListenerAddress" class="def">socketListenerAddress</a> :: <a href="DBus-Socket.html#t:SocketListener">SocketListener</a> -&gt; <a href="DBus-Internal-Address.html#t:Address">Address</a> <a href="src/DBus-Socket.html#socketListenerAddress" class="link">Source</a> <a href="#v:socketListenerAddress" class="selflink">#</a></p><div class="doc"><p>Get the address to use to connect to a listener.</p></div></div><h1 id="g:6">Authentication</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Authenticator" class="def">Authenticator</a> t <a href="src/DBus-Socket.html#Authenticator" class="link">Source</a> <a href="#t:Authenticator" class="selflink">#</a></p><div class="doc"><p>An Authenticator defines how the local peer (client) authenticates
 itself to the remote peer (server).</p></div></div><div class="top"><p class="src"><a id="v:authenticator" class="def">authenticator</a> :: <a href="DBus-Socket.html#t:Authenticator">Authenticator</a> t <a href="src/DBus-Socket.html#authenticator" class="link">Source</a> <a href="#v:authenticator" class="selflink">#</a></p><div class="doc"><p>An empty authenticator. Use <code><a href="DBus-Socket.html#v:authenticatorClient">authenticatorClient</a></code> or <code><a href="DBus-Socket.html#v:authenticatorServer">authenticatorServer</a></code>
 to control how the authentication is performed.</p><pre>myAuthenticator :: Authenticator MyTransport
myAuthenticator = authenticator
    { <code><a href="DBus-Socket.html#v:authenticatorClient">authenticatorClient</a></code> = clientMyAuth
    , <code><a href="DBus-Socket.html#v:authenticatorServer">authenticatorServer</a></code> = serverMyAuth
    }

clientMyAuth :: MyTransport -&gt; IO Bool
serverMyAuth :: MyTransport -&gt; String -&gt; IO Bool
 </pre></div></div><div class="top"><p class="src"><a id="v:authenticatorClient" class="def">authenticatorClient</a> :: <a href="DBus-Socket.html#t:Authenticator">Authenticator</a> t -&gt; t -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/DBus-Socket.html#authenticatorClient" class="link">Source</a> <a href="#v:authenticatorClient" class="selflink">#</a></p><div class="doc"><p>Defines the client-side half of an authenticator.</p></div></div><div class="top"><p class="src"><a id="v:authenticatorServer" class="def">authenticatorServer</a> :: <a href="DBus-Socket.html#t:Authenticator">Authenticator</a> t -&gt; t -&gt; <a href="DBus.html#t:UUID">UUID</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/DBus-Socket.html#authenticatorServer" class="link">Source</a> <a href="#v:authenticatorServer" class="selflink">#</a></p><div class="doc"><p>Defines the server-side half of an authenticator. The UUID is
 allocated by the socket listener.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>