socket测试-get host name error和/etc/hosts配置
在socket网络编程测试中,两个文件tcp_sercer.c 和 tcp_client.c编译
gcc tcp_server .c -o tcp_server
gcc tcp_client .c -o tcp_client
运行服务器 ./tcp_server
运行客户端 ./tcp_client book
book是主机名
查看主机名
#hostname
b
原创
2014-12-05 15:42:32 ·
1402 阅读 ·
0 评论