Portability | portable |
---|---|
Stability | experimental |
Maintainer | Stefan Schmidt (stefanschmidt@web.de) |
Version : 0.1
- type WorkerId = Int
- data MasterRequestMessage
- data MasterResponseMessage
- data WorkerRequestMessage
- data WorkerResponseMessage
- performPortAction :: (Show a, Binary a, Show b, Binary b, RspMsg b) => Port a -> Stream b -> Int -> a -> (b -> IO (Maybe c)) -> IO c
Datatypes
Messages to and from the Master
Messages to and from the Worker
request an response handling
:: (Show a, Binary a, Show b, Binary b, RspMsg b) | |
=> Port a | request port |
-> Stream b | response Stream |
-> Int | timeout for the response in mikroseconds (1000000 = 1 sec) (0 = wait for ever) |
-> a | request message |
-> (b -> IO (Maybe c)) | response handler |
-> IO c |
Sends a request to the server (stream) and handles the response and all error cases. Very helpful when simulating a request response scheme with the mailboxes.