FreeBSD Developers' Handbook
Prev | Chapter 7 Sockets | Next

# 7.4 The Sockets Model

BSD sockets are built on the basic UNIX® model: Everything is a file. In our example, then, sockets would let us receive an HTTP file, so to speak. It would then be up to us to extract the PNG file from it.

Because of the complexity of internetworking, we cannot just use the `open` system call, or the `open()` C function. Instead, we need to take several steps to ¡§opening¡¨ a socket.

Once we do, however, we can start treating the socket the same way we treat any file descriptor: We can `read` from it, `write` to it, `pipe` it, and, eventually, `close` it.

Prev | Home | Next
Protocols | Up | Essential Socket Functions

¥»¤å¤Î¨ä¥L¤å¥ó¡A¥i¥Ñ¦¹¤U¸ü¡Gftp://ftp.FreeBSD.org/pub/FreeBSD/doc/¡C

Y¦³ FreeBSD ¤è±ºÃ°Ý¡A½Ð¥ý¾\Åª FreeBSD ¬ÛÃö¤å¥ó¡A¦p¤£¯à¸Ñ¨Mªº¸Ü¡A¦A¬¢¸ß <questions@FreeBSD.org>¡C
Ãö©ó¥»¤å¥óªº°ÝÃD¡A½Ð¬¢¸ß <doc@FreeBSD.org>¡C