Permalink
Browse files

Export SPDY as a library.

The executable is still built, but the guts of the program is now
exported as a library.
  • Loading branch information...
kolmodin committed May 3, 2012
1 parent 3310b69 commit 17837be16a67c9676c1f963052497c91a10e67a4
Showing with 14 additions and 25 deletions.
  1. +0 −1 { → example}/app.hs
  2. +0 −12 main.hs
  3. +14 −12 spdy.cabal
@@ -49,4 +49,3 @@ advertiseSPDY spdyPort app request = do
ResponseSource s h source -> ResponseSource s (alternateProtocol:h) source
where
alternateProtocol = (mk "Alternate-Protocol", B.concat [C8.pack spdyPort, ":npn-spdy/2"])
-
View
12 main.hs
@@ -1,12 +0,0 @@
-module Main where
-
-import Network.SPDY
-
-import System.Environment
-
-main = do
- args <- getArgs
- port <- case args of
- [portS] -> return portS
- [] -> return "2000"
- server (sessionHandler frameHandler) port
View
@@ -9,35 +9,37 @@ license: BSD3
license-file: LICENSE
author: Lennart Kolmodin
maintainer: kolmodin@gmail.com
-copyright: Lennart Kolmodin 2011,
+copyright: Lennart Kolmodin 2011-2012,
Google Inc. 2012.
category: Network
build-type: Simple
cabal-version: >=1.8
executable spdy
- main-is: main.hs
+ main-is: app.hs
+ hs-source-dirs: example
other-modules:
- Network.SPDY,
- Network.SPDY.Frame,
- Network.SPDY.Utils
- build-depends: base, binary >= 0.5.2.0, binary-bits, network, text, bytestring, stm, conduit, zlib-bindings, transformers, tls, tls-extra, crypto-api, certificate, pem
+ build-depends: spdy,
+ base, bytestring,
+ case-insensitive, wai-app-static, transformers, warp,
+ http-types, wai
ghc-options: -threaded -Wall
-executable app
- main-is: app.hs
+library
+ exposed-modules:
+ Network.Wai.Handler.Hope
+ -- Network.SPDY
other-modules:
- Network.SPDY,
Network.SPDY.Frame,
Network.SPDY.Utils
build-depends: base, bytestring, network, text, stm,
binary >= 0.6.0.0, binary-bits, attoparsec,
conduit == 0.4.*, zlib-bindings == 0.1.*,
tls == 0.9.*, tls-extra, pem, crypto-api, certificate,
- wai, http-types, vault,
- transformers, blaze-builder, case-insensitive,
- wai-app-static, warp, unordered-containers
+ wai, http-types, vault, transformers,
+ blaze-builder, case-insensitive,
+ unordered-containers
ghc-options: -threaded -Wall

0 comments on commit 17837be

Please sign in to comment.