ú΂Ňył^      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]  Safe-InferredM^)ByteString should be exactly 4 bytes long_ Apply mask`Create a random mask^_`^_`^_`None+8Error in case of failed handshake. Will be thrown as an a.jTODO: This should probably be in the Handshake module, and is solely here to prevent a cyclic dependency.rfor example "EOF came too early" (which is actually a parse error) or for your own errors. (like "unknown path"?)UThe request was well-formed, but the library user rejected it. (e.g. "unknown path")SThe servers response was somehow invalid (missing headers or wrong security token)JThe request was somehow invalid (missing headers or wrong security token)XWe don't have a match for the protocol requested by the client. todo: version parameterA response including a bodyHTTP response, without body. A request with a body2An HTTP request. The request body is not yet read.Request headersbParse an initial requestcEncode an HTTP upgrade responsedAn upgrade responsee Bad requestfHTTP response parsergGet the Sec-WebSocket-Version headeršList of subprotocols specified by the client, in order of preference. If the client did not specify a list of subprotocols, this will be the empty list.$ hibcjdefklmgno" hibcjdefklmg hibcjdefklmgnoNone+JVarious exceptions that can occur while receiving or transmitting messagesGThe client sent garbage, i.e. we could not parse the WebSockets stream.ćThe peer unexpectedly closed the connection while we were trying to receive some data. This is a violation of the websocket RFC since the TCP connection should only be closed after sending and receiving close control messages.˙ The peer has requested that the connection be closed, and included a close code and a reason for closing. When receiving this exception, no more messages can be sent. Also, the server is responsible for closing the TCP connection once this exception is received.See  .http://tools.ietf.org/html/rfc6455#section-7.4 for a list of close codes.˜In order to have an even more high-level API, we define a typeclass for values the user can receive from and send to the socket. A few warnings apply:)Natively, everything is represented as a p$, so this is the fastest instanceYou should only use the q or the rU instance when you are sure that the data is UTF-8 encoded (which is the case for  messages).^Messages can be very large. If this is the case, it might be inefficient to use the strict s and r instances..For an end-user of this library, dealing with Frame|s would be a bit low-level. This is why define another type on top of it, which represents data for the application layer. Different control messages$=The kind of message a server application typically deals withtuv !"#$%&wxyz{tuv !"#$%& tvu #"!$&%wxyz{None'4Lightweight abstraction over an input/output stream.|State of the stream'}~€|‚(ReadingWritingResulting stream)*+,-'()*+,-'()*+,-'}~€|‚()*+,-None+ƒ(Internal state used by the demultiplexer„3Thrown if the client sends invalid multiplexed data…AThe type of a frame. Not all types are allowed for all protocols.†0A low-level representation of a WebSocket packetƒ‡ˆ„‰…Š‹ŒŽ†‘’“”•–—˜™ƒ…Š‹ŒŽ†‘’“”•–—˜ƒˆ‡„‰…ŽŒ‹Š†‘’“”•–—˜™Noneš Parse a frame ›œžŸ Ąš˘Ł›œŸ ĄŁ ›œžŸ Ąš˘Ł None:M ¤ĽŚ§¨ŠŞŤŹ­Ž ¤ĽŚ§¨ŠŞŤŹ­Ž ¤ĽŚ§¨ŠŞŤŹ­ŽNone.Set options for a 1.0 Whenever a ponga is received, this IO action is executed. It can be used to tickle connections or fire missiles.8˙`According to the RFC, both the client and the server MUST send a close control message to each other. Either party can initiate the first close message but then the other party must respond. Finally, the server is in charge of closing the TCP connection. This IORef tracks if we have sent a close message and are waiting for the peer to respond.9Type protecting the 6 and 7& IO actions. By using this inside an ŻS we can protect from concurrent writes/reads, and writes/reads to closed channels.>.The subprotocol to speak with the client. If pendingSubprotcols is non-empty, >0 must be one of the subprotocols from the list.?VA new client connected to the server. We haven't accepted the connection yet, though.AOptions, passed as-is to the 1B,Useful for e.g. inspecting the request path.CsOne-shot callback fired when a connection is accepted, i.e., *after* the accepting response is sent to the client.DInput/output stream°UtilityJJReceive an application message. Automatically respond to control messages.BWhen the peer sends a close control message, an exception of type Ľ is thrown. The peer can send a close control message either to initiate a close or in response to a close message we have sent to the peer. In either case the — exception will be thrown. The RFC specifies that the server is responsible for closing the TCP connection, which should happen after receiving the  exception from this function.This will throw ) if the TCP connection dies unexpectedly.K>Receive a message, converting it to whatever format is needed.MSend a NSend a message as textOSend a message as binary dataPiSend a friendly close message. Note that after sending this message, you should still continue calling J to process any in-flight messages. The peer will eventually respond with a close control message of its own which will cause J to throw the T exception. This exception is when you can finally consider the connection closed.Q:Send a friendly close message and close code. Similar to P, you should continue calling J until you receive a  exception.See  .http://tools.ietf.org/html/rfc6455#section-7.4 for a list of close codes.R Send a pingS2Forks a ping thread, sending a ping message every n_ seconds over the connection. The thread dies silently if the connection crashes or is closed.'./0123456789:;<=>?@ABCD°EFGHIJKLMNOPQRS&./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRS&?@ABCD<=>EFG9;:12345678./0HIJKLMNOPQRS./0123456789;:<=>?@ABCD°EFGHIJKLMNOPQRS NoneT>WebSockets application that can be ran by a server. Once this ąA action finishes, the underlying socket is closed automatically.U˝Provides a simple server. This function blocks forever. Note that this is merely provided for quick-and-dirty standalone applications, for real applications, you should use a real server.V A version of U, which allows you to customize some options.WĽCreate a standardized socket on which you can listen for incomming connections. Should only be used for a quick and dirty solution! Should be preceded by the call  .X1Turns a socket, connected to some client, into a ?.TUAddress to bindPort to listen on Application Never returnsVW˛XTUVWXTUVW˛X NoneYAA client application interacting with a single server. Once this ąA action finished, the underlying socket is closed automatically.YZHostPortPathClient application[HostPortPathOptionsCustom headers to sendClient application\StreamHostPathConnection optionsCustom headers to sendClient application]SocketHostPathOptionsCustom headers to sendClient applicationYZ[\]YZ[\]NoneMH  !"#$%&./01<=>?BEFGHIJKLMNOPRSTUVWXYZ[\]I?BB<=>EFG1./0HIJKLMNOPR  $&% #"!TUVWXYZ[]\Sł !"#$%&'()*+,-.'*/012345667889:;<=>?@?AABCCDEFGHIJKLMNOPQRSTUV W X Y Z [ \ ] ^ _ `abcdefghijklmnopqrstuvwxy)xz)u{w|}~€‚ƒ„/…†‡ˆ‰Š‹ŒŠŽ‹‘’“”•–—˜™š›œžŸ Ą˘Ł¤ĽŚ§ ¨ Š Ş Ť Ÿ Ź   Ą Ł Ľ §d­Žݰą˛ ł´websockets-0.9.2.0Network.WebSocketsNetwork.WebSockets.StreamNetwork.WebSockets.ConnectionNetwork.WebSockets.Hybi13.MaskNetwork.WebSockets.HttpNetwork.WebSockets.Types%Network.WebSockets.Hybi13.DemultiplexNetwork.WebSockets.Hybi13Network.WebSockets.ProtocolNetwork.WebSockets.ServerNetwork.Socket withSocketsDoNetwork.WebSockets.ClientHandshakeExceptionOtherHandshakeExceptionRequestRejectedMalformedResponseMalformedRequest NotSupportedResponse ResponseHead responseCoderesponseMessageresponseHeadersRequest RequestHead requestPathrequestHeaders requestSecureHeadersgetRequestSubprotocolsConnectionExceptionParseExceptionConnectionClosed CloseRequestWebSocketsDatafromLazyByteStringtoLazyByteString DataMessageBinaryTextControlMessagePongPingCloseMessageStream makeStreammakeSocketStreammakeEchoStreamparsewritecloseConnectionOptionsconnectionOnPong ConnectionconnectionOptionsconnectionTypeconnectionProtocolconnectionParseconnectionWriteconnectionSentClose Available Unavailable AcceptRequestacceptSubprotocolPendingConnectionpendingOptionspendingRequestpendingOnAccept pendingStream acceptRequestacceptRequestWith rejectRequestdefaultConnectionOptionsreceivereceiveDataMessage receiveDatasendsendDataMessage sendTextDatasendBinaryData sendClose sendCloseCodesendPingforkPingThread ServerApp runServer runServerWithmakeListenSocketmakePendingConnection ClientApp runClient runClientWithrunClientWithStreamrunClientWithSocketMask maskPayload randomMaskbase GHC.Exception ExceptiondecodeRequestHeadencodeResponseHead response101 response400decodeResponseHeadgetRequestSecWebSocketVersionencodeRequestHead encodeRequestencodeResponsedecodeResponsegetRequestHeadergetResponseHeaderdecodeHeaderLine$fExceptionHandshakeExceptionbytestring-0.10.4.0Data.ByteString.Lazy.Internal ByteString text-1.2.0.0Data.Text.Internal.LazyData.Text.InternalData.ByteString.InternalConnectionTypeClientConnectionServerConnection$fExceptionConnectionException$fWebSocketsDataText$fWebSocketsDataText0$fWebSocketsDataByteString$fWebSocketsDataByteString0 StreamStatestreamIn streamOut streamStateOpenClosedDemultiplexStateDemultiplexException FrameTypeFrameEmptyDemultiplexState PongFrame PingFrame CloseFrame BinaryFrame TextFrameContinuationFrameframeFin frameRsv1 frameRsv2 frameRsv3 frameType framePayloademptyDemultiplexState demultiplex$fExceptionDemultiplexException parseFrameheaderVersions finishRequestfinishResponse encodeMessageencodeMessages encodeFramedecodeMessageshashKey createRequestProtocolHybi13defaultProtocol protocols compatibleGHC.MVarMVar sendResponseghc-prim GHC.TypesIOrunApp