Pup-Events-Client 1.0 → 1.1
raw patch · 2 files changed
+3/−3 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
- PupEventsClient: client :: Maybe [Char] -> Int -> (a -> Int) -> (t -> t -> String) -> [ParsecT [Char] () Identity a] -> IO (PQueue t, PQueue a)
+ PupEventsClient: client :: Maybe [Char] -> Int -> (a -> Int) -> (t -> t -> String) -> [ParsecT [Char] () Identity a] -> IO (PQueue t, PQueue a, IO ())
Files
- Pup-Events-Client.cabal +1/−1
- PupEventsClient.hs +2/−2
Pup-Events-Client.cabal view
@@ -1,5 +1,5 @@ name: Pup-Events-Client-version: 1.0+version: 1.1 synopsis: A networked event handling framework for hooking into other programs. description: Pup-Events is a networking enabled event handling
PupEventsClient.hs view
@@ -21,7 +21,7 @@ -> (a -> Int) -- ^ A function to return the priority level of an event -> (t -> t -> String) -- ^ A function to return the string representation of an event -> [ParsecT [Char] () Data.Functor.Identity.Identity a] -- ^ A list of parsers that return Event objects- -> IO (PQueue t, PQueue a) -- ^ We return a pair of "PQueues" to use in communicating events. The first is for all events going to the server, the second is for events coming from the server.+ -> IO (PQueue t, PQueue a, IO ()) -- ^ We return a pair of "PQueues" to use in communicating events. The first is for all events going to the server, the second is for events coming from the server. We also return a function to manually close both the socket and handle we use to connect to the server. client Nothing priorities lookupPriority lookupUnHandler parsers = client (Just "localhost") priorities lookupPriority lookupUnHandler parsers client ip priorities lookupPriority lookupUnHandler parsers= -- get address info@@ -43,7 +43,7 @@ forkOS $ recvEvents handle inqueue lookupPriority parsers -- outqueue is the outgoing messages to the server -- inqueue is the incoming messages from the server- return (outqueue, inqueue)+ return (outqueue, inqueue, (shutdown sock ShutdownBoth >> hClose handle)) -- |The sendEvents function handles the sending of all outgoing events to the server. It checks for an event, blocks if none is available, and sends it. sendEvents :: Handle -- ^ Handle to send events on