Open-source project
riba2534/TCP-IP-NetworkNote avatar
riba2534/TCP-IP-NetworkNote

TCP-IP-NetworkNote covers chapters 1 to 18 and then jumps to 24, in Chinese, with both Windows sections left unwritten

Study notes for TCP/IP Network Programming by Yoon Sung-woo (Korea).

2,538 stars406 forksCLicense varies

At a glance

What is it?
Study notes and 96 C examples for a Korean textbook on TCP/IP network programming, published as an online book at tcp.riba2534.cn and built on Linux only. What the repository states about itself is narrower than the chapter count suggests: nineteen chapters are covered, numbered 1 through 18 and then 24, both Windows sections of chapter 1 are marked as omitted, and the documented toolchain is Ubuntu 18.04 with gcc 7.3.0.
Who is it for?
Treat this repository as a reader's record of one book rather than as a maintained reference, and it does its job well: nineteen chapters, runnable C, and a build path you can follow without any setup beyond gcc. Four things to accept before you rely on it.
Can I use it commercially?
Not without permission. GitHub finds no licence file in the repository, and without a licence all rights are reserved by default: you may read the code but not reuse it. Check the README, or ask the authors, before using it.
Is it still maintained?
Yes. The repository last received commits 140 days ago.
What is it written in?
Mainly C, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • riba2534/TCP-IP-NetworkNote2,538 ★ · +14
Star history
Repository2026-09-302026-11-15
riba2534/TCP-IP-NetworkNote2.5k2.5k

14 Stars in the last 46 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Nineteen chapters are covered, numbered 1 through 18 and then 24

The stated scope is nineteen chapters of theory and 96 C examples, and the table of contents has nineteen entries. They run in order from chapter 1, on understanding network programming and sockets, through chapter 18 on implementing a multithreaded server, and then jump straight to chapter 24 on building an HTTP server.

There is no chapter 19, 20, 21, 22 or 23 anywhere in the list. The same gap is visible in the repository itself, where the top level holds `ch01/` through `ch18/` and then `ch24/`, alongside `images/`, `site/`, `README.md`, `CLAUDE.md` and `.claude/`.

So the numbering follows the book rather than the notes, and the notes stop short of the end. Anyone arriving from the table of contents and counting will find the sequence break after the multithreading chapter, and anyone cross-referencing the book will find that the later material is simply not here. Nothing in the notes explains the gap.

The stated build environment is Ubuntu 18.04 with gcc 7.3.0

One line sets the environment: Ubuntu 18.04 LTS, with `gcc (Ubuntu 7.3.0) 7.3.0` and `g++ (Ubuntu 7.3.0) 7.3.0`. The same line says the notes involve only the Linux portion.

There is no build system, no makefile and no dependency manifest. Each example is a standalone C file compiled by hand, and the documented sequence for the opening pair is:

bash
# 编译服务端示例
gcc hello_server.c -o hserver

# 编译客户端示例
gcc hello_client.c -o hclient

# 运行服务端(需要端口号参数)
./hserver 9190

# 运行客户端(需要 IP 地址和端口号)
./hclient 127.0.0.1 9190

The server takes a port number as its only argument and the client takes an address and a port, which is why the pair has to be started in that order. One example needs more: the chapter 18 threaded sample links the pthread library explicitly with `gcc thread1.c -o tr1 -lpthread`. Nothing else in the notes asks for a flag, so the pthread line is the one worth remembering.

Both Windows sections of chapter 1 are marked 暂略

Chapter 1 makes a point about the two platforms before leaving the second one out entirely. The section on Linux file operations argues that on Linux socket operations and file operations are not distinguished, that a socket is treated as a kind of file, and that the ordinary I/O functions therefore apply to both. It then notes that Windows is different, has to tell sockets and files apart, and needs dedicated data transfer functions.

Having said that, the next two headings are 1.3 基于 Windows 平台的实现 and 1.4 基于 Windows 的套接字相关函数及示例. Both bodies consist of 暂略, the standard Chinese marker for omitted for now.

So the contrast is asserted and then left unillustrated. A reader on Windows gets the diagnosis and none of the treatment, and the chapter that introduces the file descriptor table, the open flags and the read and write prototypes is Linux only in practice even though the argument is comparative.

Four POSIX calls carry the telephone analogy, and their return conventions differ

The opening chapter builds its model from an analogy: a socket is installing a telephone, binding assigns a telephone number, listening connects the line, and accepting picks up the receiver when it rings. Each step is given as a C prototype with its return convention attached.

`int socket(int domain, int type, int protocol)` returns a file descriptor on success and -1 on failure. `int bind(int sockfd, const struct sockaddr *myaddr, socklen_t addrlen)` returns 0 on success and -1 on failure, and it is the step that assigns the IP address and port. `int listen(int sockfd, int backlog)` also returns 0 or -1, and moves the socket into a state where it can accept requests. `int accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen)` returns a file descriptor or -1.

The asymmetry is the thing to carry away: socket and accept hand back a descriptor, while bind and listen hand back a status. The chapter then reduces the whole server side to four numbered steps in that order, and describes the client as socket plus connect and nothing else.

The descriptor examples print 3, 4 and 5, so the numbers are concrete

The file descriptor section runs a worked example, `fd_seri.c`, that creates a file and a socket and prints the integers returned. The expected output is fixed:

code
file descriptor 1: 3
file descriptor 2: 4
file descriptor 3: 5

Three consecutive values starting at 3, which is what a reader would expect given that 0, 1 and 2 are already standard input, standard output and standard error. The `read` example earlier in the chapter is written the same way, reporting `file descriptor: 3` above the file data it retrieved.

The same section is where the platform claim gets its evidence. `close` is documented as taking a descriptor and closing the corresponding file or socket alike, with the note that this again proves Linux does not distinguish files from sockets. The chapter also flags a terminology decision: the descriptor is often called a handle, but handle is Windows vocabulary, so the notes use the Linux word throughout and reserve the other term for Windows discussion.

The exercise answers are labelled the author's own opinion

The final subsection of chapter 1 is the exercise set, and it opens with a caveat rather than a question. The answers that follow represent only the author's personal view and may not be correct answers.

That is a small line with an outsized effect on how the notes should be read. Everything before it, the prototypes, the flag table and the compile commands, is checkable against a compiler. The answers are not, and the notes say so rather than presenting them as settled.

The rest of the file descriptor material is the closest thing here to reference content. The flag table covers `O_CREAT` for creating when necessary, `O_TRUNC` for deleting existing data, `O_APPEND` for writing after what is already there, and the three access modes `O_RDONLY`, `O_WRONLY` and `O_RDWR`. The size types are called out too: `size_t` is an unsigned integer and `ssize_t` is the same shape made signed, with the leading s standing for signed.

Chapter 1 is written out inline in the README, beside a parallel site directory

The README does more than introduce the project. The first chapter is set out inside it in full, with the function prototypes, the telephone dialogue, the flag table, the expected program output and the compile commands, so the opening material is readable without leaving the repository front page.

The same content is also available in two other forms. `site/` holds the online book, a VitePress project that can be previewed locally with `cd site`, then `npm install`, then `npm run dev` on http://localhost:5173, and built to `site/.vitepress/dist` with `npm run build`. The published version sits at tcp.riba2534.cn with full text search and per-file source viewing for the 96 C examples.

Two releases exist. v1.0 was tagged on 2019-02-07 and v2.0 on 2026-01-07, the latter described only as a layout improvement. Seven years separate them, and the last push on the branch is dated 2026-06-28, which is after the newer tag. The commits between the two tags are the substance of that gap.

No license file, and the terms are a request rather than a grant

No license is declared anywhere, and there is no LICENSE file among the top level entries, which are `.claude/`, `.github/`, `.gitignore`, `CLAUDE.md`, `README.md`, the chapter directories, `images/` and `site/`.

What exists instead is a short 许可 section at the end of the introduction, and it reads as a request rather than as permission. The note content is for study and exchange, with attribution asked for. The code examples are described as coming with the original book and being for study only.

That second sentence is the one that matters for reuse, and it is about material this repository did not author. The prototypes and compile lines quoted throughout the notes are POSIX interfaces and shell commands rather than book text, but the example programs themselves are presented as the book's. Anyone planning to lift code out of the chapter directories should treat the attribution sentence as binding, because no license file exists to tell them otherwise.

Editorial conclusion

Treat this repository as a reader's record of one book rather than as a maintained reference, and it does its job well: nineteen chapters, runnable C, and a build path you can follow without any setup beyond gcc. Four things to accept before you rely on it. The Linux assumption is absolute, since the notes say so and leave both Windows sections unwritten, so nothing here transfers to a Windows host unchanged. The chapter numbering is not continuous, with nothing for 19 through 23, so do not treat chapter N here as chapter N of the book. The toolchain is stated as Ubuntu 18.04 LTS with gcc 7.3.0, and the examples are plain C without a build system, so compile them individually rather than expecting a project file. And check the terms yourself before reusing anything: the repository records no license and the README asks for attribution rather than granting one, and the code examples are described as coming from the original book for study only.

Frequently asked questions

What is TCP-IP-NetworkNote?

It is a set of Chinese-language study notes and C code for the book 《TCP/IP 网络编程》 by the Korean author 尹圣雨, covering 19 chapters of theory and 96 C examples. The notes are published as an online book at tcp.riba2534.cn with full text search and per-example source viewing.

Does TCP-IP-NetworkNote cover Windows?

No. The notes state that they involve only the Linux part, and both Windows sections in chapter 1, 基于 Windows 平台的实现 and 基于 Windows 的套接字相关函数及示例, are left as 暂略. The chapter does explain that Windows distinguishes sockets from files and needs dedicated transfer functions.

How do I compile the examples in TCP-IP-NetworkNote?

There is no build system, so each file is compiled by hand. The opening pair uses `gcc hello_server.c -o hserver` and `gcc hello_client.c -o hclient`, then `./hserver 9190` and `./hclient 127.0.0.1 9190`. The chapter 18 threaded example additionally needs `gcc thread1.c -o tr1 -lpthread`.

Which chapters does TCP-IP-NetworkNote cover?

Nineteen, numbered chapter 1 through chapter 18 and then chapter 24 on building an HTTP server. The top level holds ch01 through ch18 and ch24 directories, and nothing exists for chapters 19 to 23.

What license does TCP-IP-NetworkNote use?

None is declared, and there is no LICENSE file at the top level. The only terms are two sentences in the introduction: the note content is for study and exchange with attribution requested, and the code examples come from the original book for study only.

Official sources

  1. Issues
  2. Project website
  3. README
  4. Releases
  5. riba2534/TCP-IP-NetworkNote on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/riba2534-tcp-ip-networknote.svg)](https://hysenlabs.com/projects/riba2534-tcp-ip-networknote)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/riba2534-tcp-ip-networknote.svg)](https://hysenlabs.com/projects/riba2534-tcp-ip-networknote)

Was this useful?