
网络
zz_d
这个作者很懒,什么都没留下…
展开
-
P2P
p2p 和client-server联系1, peer-to-peer,对等传输,没有固定的server2, 很多程序采用了client-server和p2p两种架构3, p2p文件共享实际上也依赖于client-server模式,发出请求的peer即为client. 所有的peer既可以是client又可以是server 一个peer想请求一个文件,如原创 2011-06-04 19:15:00 · 717 阅读 · 0 评论 -
tftp详细日志查看
1. 在/var/log/messages 中, 有 tftp相关的日志, 可用 "cat messages | grep tftp" 查看, 但信息很简要;2. 编辑 /etc/xinetd.d/tftp, 给 "server_args" 添加 " -v "选项;3. 重启 xinetd, "service xinetd restart";4. 此时 /var/log/message原创 2012-07-16 17:13:57 · 8881 阅读 · 0 评论 -
http 协议 post 方法没有长度限制
"In contrast to the GET request method where only a URL and headers are sent to the server, POST requests also include a message body. This allows for arbitrary length data of any type to be sent to原创 2012-08-29 16:04:32 · 802 阅读 · 0 评论 -
linux c 获取本机所有IP
经常需要获取本机的ip地址, 通常的 gethostname和gethostbyname 经常只返回 "127.0.0.1", 这里提供一个返回 "ip1, ip2, ..." 格式的接口.#include #include #include #include #include #include #include #include #include char *ge原创 2012-08-20 13:28:40 · 5380 阅读 · 0 评论 -
配置文件的更新方法
配置文件的更新, 是cs架构程序经常需要完成的一项功能.以下是我自己想出并采用了的一套通过较小的网络传输更新所有文件的方法.假设配置文件是 json 格式的.如果有 a.js, b.js, c.js 三配置文件, 则按照以下格式生成一个 meta.js 文件:{ "all":["a.js", "b.js", "c.js"], "a.js":"md5 of a.js", "b原创 2012-09-05 23:17:47 · 1124 阅读 · 0 评论