haskell-ssh icon indicating copy to clipboard operation
haskell-ssh copied to clipboard

any release plans ?

Open simonmichael opened this issue 3 years ago • 2 comments

Hi @lpeterse, thanks for this package. I'm exploring using it for darcsden and hub.darcs.net. I see you did a bunch more work on it in 2019 - is that close to releasable, or relevant for ssh servers ?

simonmichael avatar Dec 13 '21 17:12 simonmichael

Somewhat related: it's not clear how to get the stream required to start a server - 0.1.0.0's haddock shows a Socket being used, but this is not an instance of DuplexStream.

simonmichael avatar Dec 13 '21 18:12 simonmichael

@simonmichael

I'm hoping for a release, too! I notice in the old released version, onConnect isn't exposed in the config, so I can't create a server I can connect to. However, in this version on Github, onConnect is exposed and I can connect. I'm not sure if I'm just not using the released version properly, or if this is a bug. Anyway, it is fixed in the version here on Github.

You can make Socket an instance of DuplexStream:

import qualified Network.Socket.ByteString     as SBS

instance DuplexStream Socket 

instance InputStream Socket where
  peek = SBS.recv
  receive = SBS.recv

instance OutputStream Socket where
  send = SBS.send 

aryzach avatar Feb 22 '22 00:02 aryzach