Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
? ?????? ???????, ??????? ? ??? ???????????? ?? ??????????? ??????? ? ????? ???????? ??? ???, ???????. ???? ???????????? ???????:
char get_byte();
??????? ?????? ???? ?? ??????? ??????????. ??? ?????????????, ??????? ????, ???? ?? ?????? ????????? ????. ?? ?????????? ???????????? ?????? ?????????? ???????: ??? ????? ?????, ?? ???????? ??????? ??????. ????? ?????? ???????? ? ???? ????????? ??????, ?.?. ?? ????? ??? ?????.
????? ???????? ??????? recv, ?????????? ????????? ?????:
size_t recv(char* buf, size_t size);
? buf ?????????? ????????? ?? ?????, ???? ?????? ???? ??????? ????? (?????????, ??????? ?????????). size ????????? ?????? ????? ??????. ??????? ?????????? ?????? ????? ?????? (??????? ?????????) ???? ????? ??????? ???????. ? ?????? ?????? ???????????? 0.
??????????, ?? ???????? ???????????? ?????, ?? ????? ?????. ?????????? ??????? ????? ???? ?????? ? ?? ??????????? ?????. ??????? recv ?????????? ?? ??????? ???????. ?????? ??????? ???. ?????????? ???.
???????? ?? ????? ?????????? ??? ??? ???? ??????? ??????? ?? ?????, ??? ?????? ?? ???? ????????????. ?? ??????? ???? ?? ????????? ???? ???????.
Cross-posted from blog.not-a-kernel-guy.com.