到官方网站下载源代码,先看readme.里头教你怎么做的.
如果你用ubuntu的话,在测试课本第5页的程序时,可能会遇到一个情况,connect dennied.
那是因为你的daytime服务没有开。
具体解决方案在
http://ubuntuforums.org/showthread.php?t=650791
摘录如下:
First, you'll need to install xinetd:
Next you'll need to enable the daytime and echo services by editing their config files
in /etc/xinetd.d (you should only need to change the disable option from yes to no )
Finally tell xinetd to reload the configuration:
Note that by default, anyone will be able to connect to these services. You can (if you want),
restrict access to only allow connections from certain addresses, to disallow connections from
certain addresses, or to only accept connections from a specific network interface, by adding
only_from, no_access or bind options to the configuration files (have a look at the xinetd.conf man page
for details on these and other configuration options).
First, you'll need to install xinetd:
Code:
sudo aptitude install xinetd
in /etc/xinetd.d (you should only need to change the disable option from yes to no )
Finally tell xinetd to reload the configuration:
Code:
sudo invoke-rc.d xinetd reload
restrict access to only allow connections from certain addresses, to disallow connections from
certain addresses, or to only accept connections from a specific network interface, by adding
only_from, no_access or bind options to the configuration files (have a look at the xinetd.conf man page
Code:
man xinetd.conf