úÎ!`\œ/      !"#$%&'()*+,-. BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalportableNone$F connectionCShared values (certificate store, sessions, ..) between connectionsuAt the moment, this is only strictly needed to shared sessions and certificates when using a TLS enabled connection. connection9This opaque type represent a connection to a destination./ connectionthis is set to 0 on EOF connectionGreturn a simple tuple of the port and hostname that we're connected to. connectiondTLS Settings that can be either expressed as simple settings, or as full blown TLS.Params settings.|Unless you need access to parameters that are not accessible through the simple settings, you should use TLSSettingsSimple. connection(Simple TLS settings. recommended to use. connectionCfull blown TLS Settings directly using TLS.Params. for power users. connectionŠDisable certificate verification completely, this make TLS/SSL vulnerable to a MITM attack. not recommended to use, but for testing. connectiontDisable session management. TLS/SSL connections will always re-established their context. Not Implemented Yet. connection/Use server name extension. Not Implemented Yet.  connection"Proxy settings for the connection.HOtherProxy handles specific application-level proxies like HTTP proxies.XThe simple SOCKS settings is just the hostname and portnumber of the SOCKS proxy server.„That's for now the only settings in the SOCKS package, socks password, or any sort of other authentications is not yet implemented. connection0Connection Parameters to establish a Connection./The strict minimum is an hostname and the port.fIf you need to establish a TLS connection, you should make sure connectionUseSecure is correctly set.bIf you need to connect through a SOCKS, you should make sure connectionUseSocks is correctly set. connectionhost name to connect to. connectionport number to connect to. connectionoptional TLS parameters. connection#optional Proxy/Socks configuration.1 connectionNHostname This could either be a name string (punycode encoded) or an ipv4/ipv62 connectionNSimple backend enumeration, either using a raw connection or a tls connection.345/67 1289: BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalportableNone2X[P connection(Exception raised when the connect failed connection?Exception raised when there's no resolution for a specific host connectiongThis is the exception raised if we reached the user specified limit for the line in ConnectionGetLine. connectionAInitialize the library with shared parameters between connection.; connectionCreate a final TLS  ClientParams3 according to the destination and the TLSSettings. connection@Use an already established handle to create a connection object.“if the TLS Settings is set, it will do the handshake with the server. The SOCKS settings have no impact here, as the handle is already established connection@Use an already established handle to create a connection object.“if the TLS Settings is set, it will do the handshake with the server. The SOCKS settings have no impact here, as the handle is already established connection,connect to a destination using the parameter connection&Put a block of data in the connection.  connection+Get exact count of bytes from a connection.“The size argument is the exact amount that must be returned to the user. The call will wait until all data is available. Hence, it behaves like <.On end of input,   will throw an  exception.! connection!Get some bytes from a connection.·The size argument is just the maximum that could be returned to the user. The call will return as soon as there's data, even if there's less than requested. Hence, it behaves like =.On end of input, !0 returns 0, but subsequent calls will throw an  exception." connection/Get the next block of data from the connection.# connectionLike "U, but return the unused portion to the buffer, where it will be the next chunk read.$ connection3Wait for input to become available on a connection.As with >], the timeout value is given in milliseconds. If the timeout value is less than zero, then $ waits indefinitely.Unlike >L, this function does not do any decoding, so it returns true when there is any+ available input, not just full characters.% connection9Get the next line, using ASCII LF as the line terminator.This throws an  isEOFError{ exception on end of input, and LineTooLong when the number of bytes gathered is over the limit without a line terminator.ÿThe actual line returned can be bigger than the limit specified, provided that the last chunk returned by the underlaying backend contains a LF. In another world only when we need more input and limit is reached that the LineTooLong exception will be raised.RAn end of file will be considered as a line terminator too, if line is not empty.& connectionClose a connection.' connection5Activate secure layer using the parameters specified.ïThis is typically used to negociate a TLS channel on an already establish channel, e.g. supporting a STARTTLS command. it also flush the received buffer to prevent application confusing received data before and after the setSecure call.=If the connection is already using TLS, nothing else happens.( connection7Returns if the connection is establish securely or not. connection&The global context of this connection. connection@The parameters for this connection (where to connect, and such). connection*The new established connection on success.% connection>Maximum number of bytes before raising a LineTooLong exception connection Connection connection%The received line with the LF trimmed)  !"#$%&'() &! "#%$'(?      !"#$%&'()*+,-./0123456789:;<=><=?0@AB'connection-0.3.0-D2AJIKl83F0EE9bsAc4we2Network.ConnectionNetwork.Connection.TypesE isEOFErrorConnectionContext Connection connectionID TLSSettingsTLSSettingsSimple#settingDisableCertificateValidationsettingDisableSessionsettingUseServerName SockSettings ProxySettingsSockSettingsSimpleSockSettingsEnvironment OtherProxyConnectionParamsconnectionHostnameconnectionPortconnectionUseSecureconnectionUseSocksHostCannotConnectHostNotResolved LineTooLongconnectionSessionManagerinitConnectionContextconnectFromHandleconnectFromSocket connectTo connectionPutconnectionGetExact connectionGetconnectionGetChunkconnectionGetChunk'connectionWaitForInputconnectionGetLineconnectionCloseconnectionSetSecureconnectionIsSecure$fExceptionLineTooLong$fExceptionHostNotResolved$fExceptionHostCannotConnect$fShowLineTooLong$fShowHostNotResolved$fShowHostCannotConnectconnectionBufferbase GHC.MaybeNothingHostNameConnectionBackendglobalCertificateStoreconnectionBackend ConnectionID ConnectionTLSConnectionSocketConnectionStream makeTLSParamsbytestring-0.10.8.2Data.ByteStringhGethGetSomeGHC.IO.Handle.Text hWaitForInput