Last active
August 29, 2015 14:03
-
-
Save rkaneko/cae4a16e4492fbde4826 to your computer and use it in GitHub Desktop.
だめなやつ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TODO refactor ここが原因で落ちる | |
std::string Handler::receive(const int &client_sd) { | |
char buf[RCV_BUF_SIZE]; | |
// readで落ちる? | |
if (read(client_sd, buf, RCV_BUF_SIZE) < 0) { | |
Logger::error() << "read()"; | |
} | |
std::string str(buf); | |
return str; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
readの戻り値をきちんと判定しなければならないかも。
http://www.kt.rim.or.jp/~ksk/sock-faq/unix-socket-faq-ja-2.html