úÎqiŲN      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLM Safe-InferedN*ByteString should be exactly 4 bytes long O Apply mask PCreate a random mask NOPNOPNOP Safe-InferedHIn order to have an even more high-level API, we define a typeclass for I values the user can receive from and send to the socket. A few warnings  apply: * Natively, everything is represented as a Q, so this is the  fastest instance  You should only use the R or the S instance when you are > sure that the data is UTF-8 encoded (which is the case for   messages). M Messages can be very large. If this is the case, it might be inefficient to  use the strict T and S instances. .For an end-user of this library, dealing with Frames would be a bit K 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 with The connection couldn'4t be established or broke down unexpectedly. thrown  as an iteratee exception. 'the client closed the connection while & we were trying to receive some data. "todo: Also want this for sending.  The client sent malformed data.  UVWXY     UVWXY Safe-InferedZ)Internal state used by the demultiplexer [BThe type of a frame. Not all types are allowed for all protocols. \1A low-level representation of a WebSocket packet Z[]^_`ab\cdefghZ[]^_`ab\cdefghZ[ba`_^]\cdefgh Safe-Inferedijklmnijklmnijklmn Safe-InferedAError in case of failed handshake. Will be thrown as an iteratee  exception. (o condition). MTODO: This should probably be in the Handshake module, and is solely here to  prevent a cyclic dependency.  for example EOF came too early# (which is actually a parse error)  or for your own errors. (like  unknown path?) ?The request was well-formed, but the library user rejected it.  (e.g.  unknown path) CThe request was somehow invalid (missing headers or wrong security  token) We don'9t have a match for the protocol requested by the client.  todo: version parameter Response to a  Full request type 3(Internally used) HTTP headers and requested path. $Request headers pGet the Sec-WebSocket-Version header qParse an initial request r Encode an HTTP upgrade response sAn upgrade response t Bad request  !"#$pqrstuv !"#$pqrst  !"#$pqrstuv  Safe-Infered wUnique identifier for us. xVersion accepted in the Sec-WebSocket-Version  header. This is ) usually not the same, or derivable from version, e.g. for hybi10, it's  7, 8 or 17. yDDetermine if the protocol is compatible with a requested version. A . default implementation exists which uses the headerVersions of the  protocol. zEncodes messages to binary {"s. Takes a random source so it is 6 able to do masking of frames (needed in some cases). |Decodes messages from binary Ts. }EParse and validate the rest of the request. For hybi10, this is just . validation, but hybi00 also needs to fetch a security token .In case of failure, this function may throw a . 3 be amended with the RequestHttpPart for the user) ~%Implementations of the specification (Construct a close message )Construct a ping message *Construct a pong message +Construct a text message ,Construct a binary message %&'wxyz|}~()*+,%&'wxyz|}~()*+,%&'wxyz|}~()*+,  Safe-Infered€‚€€‚  Safe-InferedƒEncode a frame „…ƒ†‡ˆ„…ƒ„…ƒ†‡ˆ  Safe-Infered-‰Š€--‰Š  Safe-Infered.‹Œ..‹Œ Safe-InferedŽKReceives and checks the client handshake. If no suitable protocol is found " (or the client sends garbage), a  will be thrown. FRespond to errors encountered during handshake. First argument may be  bottom. ŽŽŽNone/@The monad in which you can write WebSocket-capable applications 0Used for asynchronous sending. 1"Options for the WebSocket program 4Default options 59Receives the initial client handshake, then behaves like 7. 69Receives the initial client handshake, then behaves like  8. 7Run a / application on an 'Enumerator'/'Iteratee' pair, given L that you (read: your web server) has already received the HTTP part of the 0 initial request. If not, you might want to use 6  instead. "If the handshake failed, throws a . Otherwise, executes the G supplied continuation. You should still send a response to the client  yourself. 8 Version of 7, which allows you to specify custom options 9spawnPingThread n* spawns a thread which sends a ping every n seconds M (if the protocol supports it). To be called after having sent the response. :Receive a message Send an arbitrary { ;$Low-level sending with an arbitrary  <HSend a message to a sink. Might generate an exception if the underlying  connection is closed. =HIn case the user of the library wants to do asynchronous sending to the  socket, he can extract a 0* and pass this value around, for example,  to other threads. ‘Get the current configuration ’Get the underlying protocol > Find out the / version used at runtime ?0Throw an iteratee error in the WebSockets monad @0Catch an iteratee error in the WebSockets monad /“”012345678•9:;<=‘’>?@/“”012345678•9:;<=‘’>?@/“”012345678•9:;<=‘’>?@ Safe-InferedAGProvides a simple server. This function blocks forever. Note that this J is merely provided for quick-and-dirty standalone applications, for real - applications, you should use a real server. BThis function wraps 7& in order to provide a simple API for  stand-alone servers. C6Create an iterator which writes to a socket. Throws a  = exception if the user attempts to write to a closed socket. AAddress to bind to Port to listen on Application to serve Never returns BCABCABC Safe-InferedCC Safe-InferedDKReceive an application message. Automatically respond to control messages. E5Receive a message, treating it as data transparently FSend a text message GSend some binary data HKReject a request, sending a 400 (Bad Request) to the client and throwing a " RequestRejected (HandshakeError) IHAccept a request. After this, you can start sending and receiving data. DEFGHII  !"#$%&'()*+,-./0123456789:;<=>?@ABDEFGHII1234/7856'&%-.AB$ !"#  IH>:DE;FG0<=()*+,9?@ DEFGHI Safe-InferedJ1A handle which keeps track of subscribed clients K Create a new J, handle, with no clients initally connected L-Broadcast a message to all connected clients MBlocks forever JKLMJKLMJKLMJKLM– !"#$%%&'()**+,-../01 2 3 4 5 6 7 8 9 : ;<=>>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`a`b]c_defghijklmnopqkrstuvw56789xyz{|}~€ ‚ ƒ „ …†‡ˆ ‰ Š ‹ Œ Œ  Ž    ‘ ’ “ ” • – — ˜™š›œ<žŸ websockets-0.5.2.1Network.WebSocketsNetwork.WebSockets.InternalNetwork.WebSockets.Util.PubSub'Network.WebSockets.Protocol.Hybi10.MaskNetwork.WebSockets.Types.Network.WebSockets.Protocol.Hybi10.Demultiplex"Network.WebSockets.Protocol.Unsafe!Network.WebSockets.Handshake.HttpNetwork.WebSockets.Protocol+Network.WebSockets.Protocol.Hybi00.Internal+Network.WebSockets.Protocol.Hybi10.Internal"Network.WebSockets.Protocol.Hybi00"Network.WebSockets.Protocol.Hybi10Network.WebSockets.HandshakeNetwork.WebSockets.MonadTMessageNetwork.WebSockets.SocketWebSocketsDatafromLazyByteStringtoLazyByteString DataMessageBinaryTextControlMessagePongPingCloseConnectionErrorConnectionClosed ParseErrorHandshakeErrorOtherHandshakeErrorRequestRejectedMalformedRequest NotSupportedResponse responseCoderesponseMessageresponseHeaders responseBodyRequest requestPathrequestHeadersrequestResponseRequestHttpPartrequestHttpPathrequestHttpHeadersHeadersBinaryProtocol TextProtocolProtocolclosepingpongtextData binaryDataHybi00Hybi10 WebSocketsSinkWebSocketsOptionsonPongdefaultWebSocketsOptionsrunWebSocketsHandshakerunWebSocketsWithHandshake runWebSocketsrunWebSocketsWithspawnPingThreadreceivesendsendSinkgetSink getVersion throwWsError catchWsError runServer runWithSocket iterSocketreceiveDataMessage receiveData sendTextDatasendBinaryData rejectRequest acceptRequestPubSub newPubSubpublish subscribeMask maskPayload randomMaskbytestring-0.9.2.1Data.ByteString.Lazy.Internal ByteStringtext-0.11.1.13Data.Text.Lazy.InternalData.Text.InternalData.ByteString.Internal$fWebSocketsDataText$fWebSocketsDataText0$fWebSocketsDataByteString$fWebSocketsDataByteString0$fExceptionConnectionErrorDemultiplexState FrameTypeFrame PongFrame PingFrame CloseFrame BinaryFrame TextFrameContinuationFrameframeFin frameType framePayloademptyDemultiplexState demultiplex castMessagetransformers-0.2.2.0Control.Monad.Trans.ErrorErrorgetSecWebSocketVersion decodeRequestencodeResponse response101 response400$fExceptionHandshakeError$fErrorHandshakeErrorversionheaderVersions supportedencodeMessagesblaze-builder-0.3.1.0'Blaze.ByteString.Builder.Internal.TypesBuilderdecodeMessages finishRequestimplementationsHybi00_$fTextProtocolHybi00_$fProtocolHybi00_encodeFrameHybi10Hybi10_$fBinaryProtocolHybi10_$fTextProtocolHybi10_$fProtocolHybi10_$fTextProtocolHybi00$fProtocolHybi00$fBinaryProtocolHybi10$fTextProtocolHybi10$fProtocolHybi10 handshake responseError sendBuilder getOptions getProtocol unWebSocketsrunWebSocketsWith'