Getting client IP address in websocket library
<p>I am using <code>Network.WebSocket</code> library. I tried <code>WS.requestHeaders . WS.pendingRequest</code> on <code>PendingConnection</code> to get the connection request information. However, it seems it doesn't have client IP information, only the server IP information in <code>Host</code> key. An example output below:</p>

<pre><code>[("Upgrade","websocket"),("Sec-WebSocket-Extensions","permessage-deflate; 
client_max_window_bits"),("Sec-WebSocket-Key","&lt;taken out for SO post&gt;"),
("Connection","Upgrade"),("Sec-WebSocket-Version","13"),("Host","localhost:8080")]
</code></pre>

<p>What will be a good way to get the "Client IP" information when running <code>Network.Websocket</code> (I am running it within <code>Snap</code> monad using <code>runWebSocketsSnap</code>). I will like to log it in case of error.</p>