[Pkg-haskell-commits] [SCM] haskell-testpack branch, master, updated. debian/1.0.2-1-4-gb0d6b36

John Goerzen jgoerzen at complete.org
Fri Apr 23 14:53:30 UTC 2010


The following commit has been merged in the master branch:
commit d9cd691025a45aa601632cf3f34cac1fe39a6fef
Author: John Goerzen <jgoerzen at complete.org>
Date:   Thu Dec 23 00:01:31 2004 +0100

    Checkpointing
    
    Keywords:
    
    
    (jgoerzen at complete.org--projects/missingh--head--0.7--patch-144)

diff --git a/ChangeLog b/ChangeLog
index 56bbb2b..e235209 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,18 @@
 # arch-tag: automatic-ChangeLog--jgoerzen at complete.org--projects/missingh--head--0.7
 #
 
+2004-12-22 17:01:31 GMT	John Goerzen <jgoerzen at complete.org>	patch-144
+
+    Summary:
+      Checkpointing
+    Revision:
+      missingh--head--0.7--patch-144
+
+
+    modified files:
+     ChangeLog ftptest.hs libsrc/MissingH/Network/SocketServer.hs
+
+
 2004-12-22 16:55:59 GMT	John Goerzen <jgoerzen at complete.org>	patch-143
 
     Summary:
diff --git a/ftptest.hs b/ftptest.hs
index 1a3de78..76ff1d5 100644
--- a/ftptest.hs
+++ b/ftptest.hs
@@ -7,7 +7,7 @@ import MissingH.IO.HVFS
 main = do
        updateGlobalLogger "" (setLevel DEBUG)
        updateGlobalLogger "MissingH.Network.FTP.Server" (setLevel DEBUG)
-       let opts = (simpleInetOptions 12345) {reuse = True}
+       let opts = (simpleTCPOptions 12345) {reuse = True}
        serveTCPforever opts $
             threadedHandler $ 
             loggingHandler "" INFO $
diff --git a/libsrc/MissingH/Network/SocketServer.hs b/libsrc/MissingH/Network/SocketServer.hs
index 2d71fda..0776f1d 100644
--- a/libsrc/MissingH/Network/SocketServer.hs
+++ b/libsrc/MissingH/Network/SocketServer.hs
@@ -37,7 +37,7 @@ sockets, but only TCP sockets have been tested to date.
 module MissingH.Network.SocketServer(-- * Generic Options and Types
                                      InetServerOptions(..),
                                      simpleTCPOptions,
-                                     SocketServer,
+                                     SocketServer(..),
                                      HandlerT,
                                      -- * TCP server convenient setup
                                      serveTCPforever,
@@ -91,8 +91,8 @@ simpleTCPOptions p = InetServerOptions {listenQueueSize = 5,
                                         protoStr = "tcp"
                                        }
 
-data SocketServer = SocketServer {options :: InetServerOptions,
-                                  sock :: Socket}
+data SocketServer = SocketServer {optionsSS :: InetServerOptions,
+                                  sockSS :: Socket}
                   deriving (Eq, Show)
 
 {- | Takes some options and sets up the 'SocketServer'.  I will bind
@@ -107,13 +107,13 @@ setupSocketServer opts =
        bindSocket s (SockAddrInet (fromIntegral (portNumber opts)) 
                      (interface opts))
        listen s (listenQueueSize opts)
-       return $ SocketServer {options = opts, sock = s}
+       return $ SocketServer {optionsSS = opts, sockSS = s}
        
 {- | Handle one incoming request from the given 'SocketServer'. -}
 handleOne :: SocketServer -> HandlerT -> IO ()
 handleOne ss func =
-    let opts = (options ss)
-        in    do a <- accept (sock ss)
+    let opts = (optionsSS ss)
+        in    do a <- accept (sockSS ss)
                  localaddr <- getSocketName (fst a)
                  func (fst a) (snd a) localaddr
     

-- 
haskell-testpack



More information about the Pkg-haskell-commits mailing list