build-type: Simple cabal-version: >= 1.8 name: xml-push version: 0.0.0.18 stability: Experimenmtal author: Yoshikuni Jujo maintainer: Yoshikuni Jujo homepage: https://github.com/YoshikuniJujo/xml-push/wiki license: BSD3 license-file: LICENSE category: Network synopsis: Push XML from/to client to/from server over XMPP or HTTP description: examples/TestSimple.hs . extensions . * ScopedTypeVariables . > module TestSimple (testSimple) where > > import Control.Monad > import Control.Concurrent > import Data.Maybe > import Data.Pipe > import Data.Pipe.ByteString > import System.IO > import Text.XML.Pipe > import Network.XmlPush > import Network.XmlPush.Simple > > testSimple :: Handle -> IO () > testSimple h = do > (sp :: SimplePusher Handle) <- generate (One h) () > void . forkIO . runPipe_ $ readFrom sp > =$= convert (xmlString . (: [])) > =$= toHandle stdout > runPipe_ $ fromHandle stdin > =$= xmlEvent > =$= convert fromJust > =$= xmlNode [] > =$= writeTo sp . examples/simpleClient . > import Network > import TestSimple > > main :: IO () > main = testSimple =<< connectTo "localhost" (PortNumber 54492) . examples/simpleServer . > import Control.Monad > import Control.Concurrent > import Network > > import TestSimple > > main :: IO () > main = forever . (void . forkIO . testSimple . fst3 =<<) . accept > =<< listenOn (PortNumber 54492) > > fst3 :: (a, b, c) -> a > fst3 (x, _, _) = x . extra-source-files: examples/simpleClient.hs examples/simpleServer.hs examples/TestSimple.hs examples/TestPusher.hs examples/FilePusher.hs examples/simple.hs examples/xmpp.hs examples/xmppTls.hs examples/httpPullCl.hs examples/httpPullSv.hs examples/httpPullTlsCl.hs examples/httpPullTlsSv.hs examples/httpPushT.hs examples/httpPushE.hs examples/httpPushTlsT.hs examples/httpPushTlsE.hs data-files: certs/cacert.sample_pem certs/localhost.sample_key certs/localhost.sample_crt certs/yoshikuni.sample_key certs/yoshikuni.sample_crt source-repository head type: git location: git://github.com/YoshikuniJujo/xml-push.git source-repository this type: git location: git://github.com/YoshikuniJujo/xml-push.git tag: xml-push-0.0.0.18 library hs-source-dirs: src exposed-modules: Network.XmlPush, Network.XmlPush.Simple Network.XmlPush.Xmpp, Network.XmlPush.Xmpp.Tls Network.XmlPush.Xmpp.Server, Network.XmlPush.Xmpp.Tls.Server, Network.XmlPush.HttpPull.Client, Network.XmlPush.HttpPull.Server Network.XmlPush.HttpPull.Tls.Client, Network.XmlPush.HttpPull.Tls.Server Network.XmlPush.HttpPush, Network.XmlPush.HttpPush.Tls Network.XmlPush.Http.Server Network.XmlPush.Http.Tls.Server other-modules: Network.XmlPush.Tls.Client Network.XmlPush.Tls.Server Network.XmlPush.Xmpp.Common Network.XmlPush.Xmpp.Server.Common Network.XmlPush.HttpPull.Client.Common Network.XmlPush.HttpPull.Server.Common Network.XmlPush.HttpPull.Server.Body Network.XmlPush.HttpPull.Tls.Server.Body Network.XmlPush.HttpPush.Common Network.XmlPush.HttpPush.Body Network.XmlPush.HttpPush.Tls.Body build-depends: base == 4.*, peyotls == 0.1.*, simple-pipe == 0.0.*, xml-pipe == 0.0.*, handle-like == 0.1.*, monad-control == 0.3.*, transformers-base == 0.4.*, monads-tf == 0.1.*, bytestring == 0.10.*, xmpipe == 0.0.*, sasl == 0.0.*, random == 1.0.*, uuid == 1.3.*, stm == 2.4.*, crypto-random == 0.0.*, x509 == 1.4.*, x509-store == 1.4.*, x509-validation == 1.5.*, tighttp == 0.0.* ghc-options: -Wall extensions: DoAndIfThenElse