dermesser / libsocket

The ultimate socket library for C and C++, supporting TCP, UDP and Unix sockets (DGRAM and STREAM) on Linux, FreeBSD, Solaris. See also my uvco library for a refreshed version!
https://borgac.net/~lbo/doc/libsocket/
Other
799 stars 195 forks source link

allow const std::string to be sent to unix stream and dgram clients #28

Closed whackashoe closed 8 years ago

whackashoe commented 8 years ago

previously doing something akin to this:

const std::string s = "ok"; *client << s;

would result in a compile error.

the string ref can be const in these functions as they do not mutate it.

whackashoe commented 8 years ago

I didn't realize my second commit(remove build conf file from git tracking) would come up on this pull request. oops.

dermesser commented 8 years ago

uuh, yeah, that's definitely supposed to be const string&. Don't know why I haven't implemented it as such. Thanks!

the second commit is ok, too.