Oswald Buddenhagen
a55354516b
move responsibility for closing sockets on error to user
...
the only user being imap and the first thing in imap_cancel_store()
being a call to socket_close(), this code was pretty pointless anyway.
13 years ago
Oswald Buddenhagen
802c99edcf
make socket read/write error reporting callback-based
...
the functions still have synchronous return codes as well - this enables
early error returns without having to resort to refcounting.
13 years ago
Oswald Buddenhagen
f1df2f40d1
decouple the filling of the read buffer from consuming it
...
this prepares the code for being called from a callback.
notably, this makes the imap list parser have a "soft stack", so the
recursion can be suspended at any time.
13 years ago
Oswald Buddenhagen
f8d73ac346
make socket_write() capable of taking ownership of the buffer
...
that way the user code doesn't have to free it any more.
13 years ago
Oswald Buddenhagen
8a72d204c9
change socket_write() return code semantics
...
instead of returning a write()-like result, return only a binary status
code - write errors are handled internally anyway, so user code doesn't
have to check the write length.
13 years ago
Oswald Buddenhagen
171f7d6cd3
Socket_t + buffer_t => conn_t
...
remove the layering, in favor of a "buffered connection" abstraction.
13 years ago
Oswald Buddenhagen
3447694c2b
security fix: failure to load the certificate file is *not* OK ...
13 years ago
Oswald Buddenhagen
ef41349035
move socket code to a separate file
...
this makes the layering more obvious
13 years ago