Skip to content

Fix typo "一点" --> "一定" #164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/c11/p03_creating_udp_server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
----------
讨论
----------
一个典型的UPD服务器接收到达的数据报(消息)和客户端地址。如果服务器需要做应答,
一个典型的UDP服务器接收到达的数据报(消息)和客户端地址。如果服务器需要做应答,
它要给客户端回发一个数据报。对于数据报的传送,
你应该使用socket的 ``sendto()`` 和 ``recvfrom()`` 方法。
尽管传统的 ``send()`` 和 ``recv()`` 也可以达到同样的效果,
Expand Down
2 changes: 1 addition & 1 deletion source/c11/p05_creating_simple_rest_based_interface.rst
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ WSGI被标准库支持,同时也被绝大部分第三方web框架支持。
yield b'Goodbye!\n'

这里要强调的一点是最后返回的必须是字节字符串。如果返回结果包含文本字符串,必须先将其编码成字节。
当然,并没有要求你返回的一点是文本,你可以很轻松的编写一个生成图片的程序。
当然,并没有要求你返回的一定是文本,你可以很轻松的编写一个生成图片的程序。

尽管WSGI程序通常被定义成一个函数,不过你也可以使用类实例来实现,只要它实现了合适的 ``__call__()`` 方法。例如:

Expand Down