Closed firepear closed 2 months ago
A consequence of this is going to be that basically all tests are going to become worthless. Should add an issue for that.
Only added Resp
. Once I got in there, it became obvious that Req isn't needed.
ConnRead
now returns only an error; everything else is put inside Resp
, which is part of petrel.Conn
, which is itself copied to the client for ease of use.
The remaining work is cleaning up all the error messages coming from ConnRead.
Done.
Creating structs for a request object and a response object means that data can live within the
Conn
.This should allow the removal of all transient data from the network read/write functions, making everything cleaner.
It also means that
ConnRead
no longer has to return a mystifying collection of things; it will simply update theConn
'sResp
and return nothing but anerr
. And thaterr
won't be overloaded with app-level information on the status of the request; it will only indicate whether there was an error with the read or not. Request status will be in the request struct.