stream: Separate TCP/Unix stream helpers from stream/service implementations

This allows us to disable Unix sockets cleanly on Windows. Replaces some
read/write calls with recv/send counterparts, as Winsock does not like
read/writes.
This commit is contained in:
Martin Willi
2014-06-04 15:53:00 +02:00
parent 93f78d8225
commit aa5b49c037
16 changed files with 524 additions and 304 deletions
+6
View File
@@ -261,6 +261,12 @@ int socketpair(int domain, int type, int protocol, int sv[2]);
*/
#define EWOULDBLOCK EAGAIN
/**
* ECONNRESET is mapped to something arbitrary. It is returned by
* stream->read_all() but should not be mapped from a send/recv WSA error.
*/
#define ECONNRESET ENXIO
/**
* recv(2) with support for MSG_DONTWAIT
*/