Jugendhackt / haskell-ricochet

(WIP/Experimental) Ricochet implementation as Haskell Library.
GNU General Public License v3.0
22 stars 0 forks source link

Write nice monadic run functions #33

Closed froozen closed 9 years ago

froozen commented 9 years ago

As we're exporting our own monad, we should provide some pleasant functions to "run" it. I'd propose startRicochet :: Socket -> [Contact] -> PortID -> Map Word8 (Connectiont -> Ricochet ()) -> IO () and startRicochet' :: ByteString -> PortID -> [Contact] -> PortID -> Map Word8 (Connectiont -> Ricochet ()) -> IO ()

The second one takes the private key and the Tor control port and does the port-mapping for the user.

sternenseemann commented 9 years ago

Proper definition:

startRicochet ::  Socket -> [Contact] -> PortID -> Versions -> IO ()
startRicochet' :: ByteString -> PortID -> [Contact] -> PortID -> Versions -> IO ()
froozen commented 9 years ago

This would also be the practical application of #12.