support a P2PConnection that uses TMVars rather than Handles
This will allow having an internal thread speaking P2P protocol, which will be needed to support proxying to external special remotes. No serialization is done on the internal P2P protocol of course. When a ByteString is being exchanged, it may or may not be exactly the length indicated by DATA. While that has to be carefully managed for the serialized P2P protocol, here it would require buffering the whole lazy bytestring in memory to check its length when sending, so it's better to do length checks on the receiving side.
This commit is contained in:
parent
28f5c47b5a
commit
c3a785204e
5 changed files with 86 additions and 45 deletions
|
@ -135,8 +135,8 @@ checkHiddenService = bracket setup cleanup go
|
|||
let conn = P2PConnection
|
||||
{ connRepo = Nothing
|
||||
, connCheckAuth = const False
|
||||
, connIhdl = h
|
||||
, connOhdl = h
|
||||
, connIhdl = P2PHandle h
|
||||
, connOhdl = P2PHandle h
|
||||
, connIdent = ConnIdent Nothing
|
||||
}
|
||||
runst <- mkRunState Client
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue