소켓 프로그래밍 공부 기록.

<aside> 💬 All quoted descriptions are from Linux man-pages.

</aside>

intro

(2) : syscalls

(3) : library functions. system call wrappers

(7) : misc

(*p) : POSIX man

<unistd.h>

linux/unistd.h at master · torvalds/linux

unistd.h(0p) - Linux manual page

unistd.h

typedef - Wikipedia

In the C standard library and in POSIX specifications, the identifier for the typedef definition is often suffixed with _t, such as in [size_t](<https://en.wikipedia.org/wiki/Size_t>) and time_t. This is practiced in other coding systems, although POSIX explicitly reserves this practice for POSIX data types.

size_t , ssize_t

The types size_t and ssize_t are, respectively, unsigned and signed integer data types specified by POSIX.1.

**ssize_t write(int** *fd***, const void ****buf***, size_t** *count***)**

write(2) - Linux manual page

Writes up to count bytes from the buffer starting at buf to the file referred to by the file descriptor fd.

return

On success, the number of bytes written is returned. On error, -1 is returned, and errno is set to indicate the error.