diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-12-06 15:49:39 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-12-06 15:50:02 -0400 |
commit | 12a58f1922d30995019ca73c462f6a9937413f2b (patch) | |
tree | 4e9a54d7ff0f4d3a204437ef295c67f7f97f5854 /P2P/IO.hs | |
parent | 5258f572d494d015c6c6e60c37a215bb95048bbd (diff) |
need to auth with the peer
Diffstat (limited to 'P2P/IO.hs')
-rw-r--r-- | P2P/IO.hs | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -11,6 +11,7 @@ module P2P.IO ( RunProto , P2PConnection(..) , connectPeer + , closeConnection , setupHandle , runNetProto , runNet @@ -60,6 +61,11 @@ connectPeer g (TorAnnex onionaddress onionport) = do , connOhdl = h } +closeConnection :: P2PConnection -> IO () +closeConnection conn = do + hClose (connIhdl conn) + hClose (connOhdl conn) + setupHandle :: Socket -> IO Handle setupHandle s = do h <- socketToHandle s ReadWriteMode |