Differences From Artifact [8af7b73d7d]:
- File
src/tcpsocket.c
— part of check-in
[17c1d8f6b0]
at
2012-09-29 22:34:49
on branch trunk
— Add tcpsocket.
TODO:
* check for getaddrinfo() in configure
* fallback if getaddrinfo() is unavailable (user: js, size: 3438) [annotate] [blame] [check-ins using]
To Artifact [f4d3eaafb5]:
- File
src/tcpsocket.c
— part of check-in
[2cee5ea2d5]
at
2012-09-30 01:01:37
on branch trunk
— Add cfw_stream_read_line().
This also adds a caching infrastructure to cfw_stream. (user: js, size: 3469) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | }; static bool ctor(void *ptr, va_list args) { CFWTCPSocket *sock = ptr; sock->fd = -1; sock->stream.ops = &stream_ops; sock->eof = false; return true; } static void dtor(void *ptr) { | > > | | 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | }; static bool ctor(void *ptr, va_list args) { CFWTCPSocket *sock = ptr; cfw_stream->ctor(ptr, args); sock->fd = -1; sock->stream.ops = &stream_ops; sock->eof = false; return true; } static void dtor(void *ptr) { cfw_stream->dtor(ptr); } bool cfw_tcpsocket_connect(CFWTCPSocket *sock, const char *host, uint16_t port) { struct addrinfo hints, *res, *res0; char portstr[7]; |
︙ | ︙ |