> For the complete documentation index, see [llms.txt](https://wskdsgcf.gitbook.io/mastering-go-zh-cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wskdsgcf.gitbook.io/mastering-go-zh-cn/13.0/13.11.md).

# 13.11 练习

* 用 Go 开发一个 **FTP 客户端**
* 接下来用 Go 开发一个 FTP 服务器。实现 FTP 客户端 和 FTP 服务器哪个更困难？为什么？
* 试着实现一个 Go 版本的 `nc(1)` 工具。编写如此复杂工具的秘诀是在实现所有可能选项前，先从实现一个原工具的基础功能版本开始。
* 修改 `TCPserver.go`，使其返回一个网络包中的数据和另一个网络包中的时间
* 修改 `TCPserver.go`，使其可以按顺序为多个客户机提供服务。注意，这和同时服务多个请求不同。简单讲，使用 `for` 循环，以便可以多次执行`Accept()` 调用。
* TCP 服务器，如 `fiboTCP.go`，在接收到给定的信号时往往会终止，因此在 `fiboTCP.go` 中添加信号处理代码，如[第8章](https://github.com/hantmac/Mastering_Go_ZH_CN/tree/master/eBook/chapter8/08.0.md)所述，告诉UNIX系统该怎么做。
* 使用 Go 中普通的 TCP 代替 `http.ListenAndServe()` 函数，开发一个您自己的小型 web server。
