summaryrefslogtreecommitdiff
path: root/src/Erebos/Service.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2025-05-25 21:37:40 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2025-05-31 17:09:53 +0200
commitd9800045d572358526bf18688f06a4cfa4f99772 (patch)
tree4f415d7d2c6f5b03889c56320140fc1ffd3df08b /src/Erebos/Service.hs
parentcd766373e829de6e877f46458bab82a355092972 (diff)
Network streams for services
Diffstat (limited to 'src/Erebos/Service.hs')
-rw-r--r--src/Erebos/Service.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Erebos/Service.hs b/src/Erebos/Service.hs
index 50bded6..9030d04 100644
--- a/src/Erebos/Service.hs
+++ b/src/Erebos/Service.hs
@@ -113,10 +113,13 @@ data ServiceInput s = ServiceInput
, svcPeerIdentity :: UnifiedIdentity
, svcServer :: Server
, svcPrintOp :: String -> IO ()
+ , svcNewStreams :: [ RawStreamReader ]
}
-data ServiceReply s = ServiceReply (Either s (Stored s)) Bool
- | ServiceFinally (IO ())
+data ServiceReply s
+ = ServiceReply (Either s (Stored s)) Bool
+ | ServiceOpenStream (RawStreamWriter -> IO ())
+ | ServiceFinally (IO ())
data ServiceHandlerState s = ServiceHandlerState
{ svcValue :: ServiceState s