úÎ!ü2ï΋      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰ŠSafe"  websocketsA size limit, in bytes. The ‹" instance takes the minimum limit. websocketswFour extension parameters are defined for "permessage-deflate" to help endpoints manage per-connection resource usage."server_no_context_takeover""client_no_context_takeover""server_max_window_bits""client_max_window_bits"  websocketsSet options for a  Connection@. Please do not use this constructor directly, but rather use ) and then set the fields you want, e.g.: EmyOptions = defaultConnectionOptions {connectionStrictUnicode = True}GThis way your code does not break if the library introduces new fields. websockets Whenever a ponga is received, this IO action is executed. It can be used to tickle connections or fire missiles. websocketsEnable . websocketsxEnable strict unicode on the connection. This means that if a client (or server) sends invalid UTF-8, we will throw a UnicodeExceptionG rather than replacing it by the unicode replacement character U+FFFD. websockets^The maximum size for incoming frame payload size in bytes. If a frame exceeds this limit, a ParseException is thrown. websocketsconnectionFrameSizeLimit· is often not enough since a malicious client can send many small frames to create a huge message. This limit allows you to protect from that. If a message exceeds this limit, a ParseException is thrown.ÔNote that, if compression is enabled, we check the size of the compressed messages, as well as the size of the uncompressed messages as we are deflating them to ensure we don't use too much memory in any case. websocketsThe default connection options:(Nothing happens when a pong is received.Compression is disabled.Lenient unicode decoding. ŒSafe"#"³ŽNone17Ó websockets8Error in case of failed handshake. Will be thrown as an .jTODO: This should probably be in the Handshake module, and is solely here to prevent a cyclic dependency. websocketsXWe don't have a match for the protocol requested by the client. todo: version parameter websocketsJThe request was somehow invalid (missing headers or wrong security token) websocketsSThe servers response was somehow invalid (missing headers or wrong security token)  websocketsUThe request was well-formed, but the library user rejected it. (e.g. "unknown path")! websocketsrfor example "EOF came too early" (which is actually a parse error) or for your own errors. (like "unknown path"?)" websocketsA response including a body$ websocketsHTTP response, without body.) websocketsA request with a body+ websockets2An HTTP request. The request body is not yet read.0 websocketsRequest headers websocketsParse an initial request‘ websocketsEncode an HTTP upgrade response’ websocketsAn upgrade response“ websockets Bad request” websocketsHTTP response parser• websocketsGet the Sec-WebSocket-Version header1 websocketsš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.– websocketsGet the Sec-WebSocket-Extensions header# !"#$%&'()*+,-./0—˜‘™’“”š›œ•1–None V<š websockets3A mask is sequence of 4 bytes. We store this in a ž% in the host's native byte ordering.Ÿ websockets Parse a mask.  websockets Encode a mask¡ websocketsCreate a random mask¢ websocketsMask a lazy bytestring. Uses £ under the hood.Ÿ ¡¢ None1ba2 websocketsJVarious exceptions that can occur while receiving or transmitting messages3 websocketsÿ 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.4 websocketsæ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.5 websocketsGThe client sent garbage, i.e. we could not parse the WebSockets stream.6 websockets‚The client sent invalid UTF-8. Note that this exception will only be thrown if strict decoding is set in the connection options.7 websockets˜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 ¤$, so this is the fastest instanceYou should only use the ¥ or the ¦U 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 § and ¦ instances.; websockets.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.UThere are currently two kinds of data messages supported by the WebSockets protocol:YTextual UTF-8 encoded data. This corresponds roughly to sending a String in JavaScript.MBinary data. This corresponds roughly to send an ArrayBuffer in JavaScript.< websockets%A textual message. The second field might” contain the decoded UTF-8 text for caching reasons. This field is computed lazily so if it's not accessed, it should have no performance impact.= websocketsA binary message.> websocketsDifferent control messagesB websockets=The kind of message a server application typically deals withD websocketsReserved bits, actual message¨ websocketsMReplace an invalid input byte with the Unicode replacement character U+FFFD.© websockets1Throw an error if there is an invalid input byte. !ª«¬265347:98;<=>?@ABCD¨©NonemzE websockets4Lightweight abstraction over an input/output stream.­ websocketsState of the streamF websocketsTCreate a stream from a "receive" and "send" action. The following properties apply:ÈRegardless of the provided "receive" and "send" functions, reading and writing from the stream will be thread-safe, i.e. this function will create a receive and write lock to be used internally.'Reading from or writing or to a closed E| will always throw an exception, even if the underlying "receive" and "send" functions do not (we do the bookkeeping). Streams should always be closed.F websocketsReading websocketsWriting websocketsResulting streamEFGHIJKLEFGHJIKL None1rŠ® websocketsResult of demultiplexing¯ websockets(Internal state used by the demultiplexer° websockets3Thrown if the client sends invalid multiplexed data± websocketsAThe type of a frame. Not all types are allowed for all protocols.² websockets0A low-level representation of a WebSocket packet®³´µ¯±¶·¸¹º»²¼½¾¿ÀÁÂÃÄ NonesÅ websockets Parse a frame ÆÇÈÉÊËÌÅÍ NoneCVsú ÎÏÐÑÒÓÔÕÖרNonewjM websocketscAn extension is currently allowed to set extra headers and transform the parse/write functions of  Connection.FThis type is very likely to change as other extensions are introduced. MNOPQR RMNOPQ NonexÙNone"#N„…Ú websocketsConvert the parameters to an  that we can put in a 'Sec-WebSocket-Extensions' header.Û websocketsFIf the window_bits parameter is set to 8, we must set it to 9 instead.Related issues: -  )https://github.com/haskell/zlib/issues/11 - (https://github.com/madler/zlib/issues/94Quote from zlib manual:ÿÌFor the current implementation of deflate(), a windowBits value of 8 (a window size of 256 bytes) is not supported. As a result, a request for 8 will result in 9 (a 512-byte window). In that case, providing 8 to inflateInit2() will result in an error when the zlib header with 9 is checked against the initialization of inflate(). The remedy is to not use 8 with deflateInit2() with this initialization, or at least in that case use 9 with inflateInit2().  ÜÝÞNoneÆ#Z websocketsÿ`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.[ websocketsKParameters that allow you to tweak how a request is rejected. Please use n^ and modify fields using record syntax so your code will not break when new fields are added.] websockets The status code, 400 by default.^ websockets%The message, "Bad Request" by default_ websockets+Extra headers to be sent with the response.` websocketsReponse body of the rejection.a websockets,This datatype allows you to set options for m&. It is strongly recommended to use kl and then modify the various fields, that way new fields introduced in the library do not break your code.c websockets.The subprotocol to speak with the client. If pendingSubprotcols is non-empty, c0 must be one of the subprotocols from the list.d websockets(Extra headers to send with the response.e websocketsVA new client connected to the server. We haven't accepted the connection yet, though.g websocketsOptions, passed as-is to the Sh websockets,Useful for e.g. inspecting the request path.i websocketssOne-shot callback fired when a connection is accepted, i.e., *after* the accepting response is sent to the client.j websocketsInput/output streamß websocketsUtilityl websockets/Accept a pending connection, turning it into a S.m websocketsThis function is like l1 but allows you to set custom options using the a datatype.r websocketsJReceive an application message. Automatically respond to control messages.BWhen the peer sends a close control message, an exception of type 3¥ 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 3— exception will be thrown. The RFC specifies that the server is responsible for closing the TCP connection, which should happen after receiving the 3 exception from this function.This will throw 4) if the TCP connection dies unexpectedly.s websockets>Receive a message, converting it to whatever format is needed.u websocketsSend a ;u. This allows you send both human-readable text and binary data. This is a slightly more low-level interface than w or y.v websocketsSend a collection of ;)s. This is more efficient than calling u many times.w websockets˜Send a textual message. The message will be encoded as UTF-8. This should be the default choice for human-readable text-based protocols such as JSON.x websocketsISend a number of textual messages. This is more efficient than calling w many times.y websocketswSend a binary message. This is useful for sending binary blobs, e.g. images, data encoded with MessagePack, images...z websocketsHSend a number of binary messages. This is more efficient than calling y many times.{ websocketsiSend a friendly close message. Note that after sending this message, you should still continue calling r to process any in-flight messages. The peer will eventually respond with a close control message of its own which will cause r to throw the 3T exception. This exception is when you can finally consider the connection closed.| websockets:Send a friendly close message and close code. Similar to {, you should continue calling r until you receive a 3 exception.See  .http://tools.ietf.org/html/rfc6455#section-7.4 for a list of close codes.} websockets Send a ping~ websockets2Forks a ping thread, sending a ping message every n_ seconds over the connection. The thread dies silently if the connection crashes or is closed.ÉThis is useful to keep idle connections open through proxies and whatnot. Many (but not all) proxies have a 60 second default timeout, so based on that sending a ping every 30 seconds is a good idea.o websocketsConnection to reject websockets#Params on how to reject the requestp websocketsConnection to reject websocketsRejection response bodyB STUVWXYZ[\^]_`abcdefhgijklmnopqrstuvwxyz{|}~Befhgijlabcdkmp[\^]_`noSTUVWXYZ qrstuvwxyz{|}~  NoneÚê websockets>WebSockets application that can be ran by a server. Once this àA action finishes, the underlying socket is closed automatically.€ websocketsÃProvides a simple server. This function blocks forever. Note that this is merely provided for quick-and-dirty or internal applications, but for real applications, you should use a real server. For example:*Performance is reasonable under load, but:.No protection against DoS attacks is provided.No logging is performed....=Glue for using this package with real servers is provided by: 2https://hackage.haskell.org/package/wai-websockets 3https://hackage.haskell.org/package/websockets-snap websockets A version of €, which allows you to customize some options.‚ websockets¥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 .ƒ websockets1Turns a socket, connected to some client, into a e. The e should be closed using L later.„ websocketsMore general version of ƒ for E instead of a á.€ websocketsAddress to bind websocketsPort to listen on websockets Application websockets Never returns€‚ƒ„Noneì … websocketsAA client application interacting with a single server. Once this àA action finished, the underlying socket is closed automatically.‰ websockets Build a new S! from the client's point of view.WARNING: Be sure to call L on the given E after you are done using the S8 in order to properly close the communication channel. ˆ7 handles this for you, prefer to use it when possible.† websocketsHost websocketsPort websocketsPath websocketsClient application‡ websocketsHost websocketsPort websocketsPath websocketsOptions websocketsCustom headers to send websocketsClient applicationˆ websocketsStream websocketsHost websocketsPath websocketsConnection options websocketsCustom headers to send websocketsClient application‰ websockets$Stream that will be used by the new S. websocketsHost websocketsPath websocketsConnection options websocketsCustom headers to sendŠ websocketsSocket websocketsHost websocketsPath websocketsOptions websocketsCustom headers to send websocketsClient application…†‡ˆ‰ŠNoneVìjl  !"#$%&'()*+,-./01265347:98;<=>?@ABCDS[\^]_`abcdehklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Šlehlabcdkmp[\^]_`noS   qrstuvwxyz{|}0)*+,-./1"#$%&'(BCD>?@A;<=7:98 !26534€‚ƒ„…†‡Šˆ‰~â !"#$%&''()*+,-./01122345667789:;< = > ? @ A B C D E F G H I J K L M I FNOPQRSTUVVWXYZ[[\]^_`abbcdefgghijjklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°G¯±G¬²® ³ ´ µ ¶ ·¸ ¹ º » ¼ ½ ¾ ¿ À Á  à Ä Å Æ ½ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ð Ü Ñ Ò Ô Ö × ÝÞßàáâãäåæçèéê*websockets-0.12.5.2-KAFsTcOc1OrBUrIFgRm9BDNetwork.WebSockets.ConnectionNetwork.WebSockets.ExtensionsNetwork.WebSocketsNetwork.WebSockets.Stream%Network.WebSockets.Connection.Options)Network.WebSockets.Extensions.DescriptionNetwork.WebSockets.HttpNetwork.WebSockets.Hybi13.MaskNetwork.WebSockets.Types%Network.WebSockets.Hybi13.DemultiplexNetwork.WebSockets.Hybi13Network.WebSockets.Protocol+Network.WebSockets.Extensions.StrictUnicode/Network.WebSockets.Extensions.PermessageDeflateNetwork.WebSockets.ServerNetwork.Socket withSocketsDoNetwork.WebSockets.Client SizeLimit NoSizeLimitPermessageDeflateserverNoContextTakeoverclientNoContextTakeoverserverMaxWindowBitsclientMaxWindowBitspdCompressionLevelCompressionOptions NoCompressionPermessageDeflateCompressionConnectionOptionsconnectionOnPongconnectionCompressionOptionsconnectionStrictUnicodeconnectionFramePayloadSizeLimitconnectionMessageDataSizeLimitdefaultConnectionOptionsdefaultPermessageDeflateExtensionDescriptionsExtensionDescriptionextName extParamsparseExtensionDescriptionsHandshakeException NotSupportedMalformedRequestMalformedResponseRequestRejectedOtherHandshakeExceptionResponse ResponseHead responseCoderesponseMessageresponseHeadersRequest RequestHead requestPathrequestHeaders requestSecureHeadersgetRequestSubprotocolsConnectionException CloseRequestConnectionClosedParseExceptionUnicodeExceptionWebSocketsDatafromDataMessagefromLazyByteStringtoLazyByteString DataMessageTextBinaryControlMessageClosePingPongMessageStream makeStreammakeSocketStreammakeEchoStreamparseBinparsewriteclose Extension extHeadersextParseextWriteNegotiateExtension ConnectionconnectionOptionsconnectionTypeconnectionProtocolconnectionParseconnectionWriteconnectionSentClose RejectRequest rejectCode rejectMessage rejectHeaders rejectBody AcceptRequestacceptSubprotocol acceptHeadersPendingConnectionpendingOptionspendingRequestpendingOnAccept pendingStreamdefaultAcceptRequest acceptRequestacceptRequestWithdefaultRejectRequestrejectRequestWith rejectRequestreceivereceiveDataMessage receiveDatasendsendDataMessagesendDataMessages sendTextData sendTextDatassendBinaryDatasendBinaryDatas sendClose sendCloseCodesendPingforkPingThread ServerApp runServer runServerWithmakeListenSocketmakePendingConnectionmakePendingConnectionFromStream ClientApp runClient runClientWithrunClientWithStreamnewClientConnectionrunClientWithSocketbaseGHC.BaseMonoidatMostSizeLimitExtensionParamencodeExtensionDescriptions GHC.Exception ExceptiondecodeRequestHeadencodeResponseHead response101 response400decodeResponseHeadgetRequestSecWebSocketVersion getRequestSecWebSocketExtensionsencodeRequestHead encodeRequestencodeResponsedecodeResponsegetRequestHeadergetResponseHeaderMaskGHC.WordWord32 parseMask encodeMask randomMask maskPayload c_mask_chunkbytestring-0.10.8.2Data.ByteString.Lazy.Internal ByteString text-1.2.3.0Data.Text.Internal.LazyData.Text.InternalData.ByteString.InternaldecodeUtf8LenientdecodeUtf8StrictConnectionTypeServerConnectionClientConnection StreamStateDemultiplexResultDemultiplexStateDemultiplexException FrameTypeFrameDemultiplexSuccessDemultiplexErrorDemultiplexContinueContinuationFrame TextFrame BinaryFrame CloseFrame PingFrame PongFrameframeFin frameRsv1 frameRsv2 frameRsv3 frameType framePayloademptyDemultiplexState demultiplex parseFrameheaderVersions finishRequestfinishResponse encodeMessageencodeMessages encodeFramedecodeMessages createRequestProtocolHybi13defaultProtocol protocols compatible strictUnicodetoExtensionDescription fixWindowBitsnegotiateDeflatemakeMessageDeflatermakeMessageInflater sendResponseghc-prim GHC.TypesIO&network-2.8.0.0-JgG270TblsEHkvPEAbLhLENetwork.Socket.TypesSocket