Eric.wei
The dream starts
My Links
IT博客
首页
联系
聚合
管理
Blog Stats
Posts - 20
Stories - 2
Comments - 1
Trackbacks - 0
常用链接
我的随笔
我的评论
我参与的随笔
留言簿
(1)
给我留言
查看公开留言
查看私人留言
随笔分类
(19)
c++(4)
(rss)
linux(15)
(rss)
文章分类
(2)
常用信息(1)
(rss)
趣闻拾遗(1)
(rss)
文章档案
(2)
2007年11月 (2)
搜索
最新评论
1. re: sock-Richard Stevens' sock program[未登录]
sock是Richard Steven自己写的程序吗?UNIX系统中怎么没有这个命令?
--jacky
阅读排行榜
1. 【zz】vim小技巧(2845)
2. 【原】2次objdump法快速确定oops位置(1638)
3. [原]实用shell脚本(不定期更新中)(1178)
4. [zz]firefox中的baidu搜索引擎插件(952)
5. 重要学术会议列表(899)
评论排行榜
1. sock-Richard Stevens' sock program(1)
2. [zz]lsof 命令详解(0)
3. 重要学术会议列表(0)
4. 【zz】vim小技巧(0)
5. 【转】Boost socket performance on Linux (0)
sock-Richard Stevens' sock program
http://www.icir.org/christian/downloads/sock-0.3.tar.gz
usage: sock
[
options
]
<host> <port> (for client
;
default)
sock
[
options
]
-s
[
<IPaddr>
]
<port> (for server)
sock
[
options
]
-i <host> <port> (for
"
source
"
client)
sock
[
options
]
-i -s
[
<IPaddr>
]
<port> (for
"
sink
"
server)
options: -b n bind n as client's local port number
-c convert newline to CR/LF & vice versa
-f a.b.c.d.p foreign IP address
=
a.b.c.d
,
foreign port#
=
p
-g a.b.c.d loose source route
-h issue TCP half close on standard input EOF
-i
"
source
"
data to socket
,
"
sink
"
data from socket (w/-s)
-j a.b.c.d join multicast group
-k write or writev in chunks
-l a.b.c.d.p client's local IP address
=
a.b.c.d
,
local port#
=
p
-n n #buffers to write for
"
source
"
client (default
1024
)
-o do NOT connect UDP client
-p n #ms to pause before each read or write (source/sink)
-q n size of listen queue for TCP server (default
5
)
-r n #bytes per read() for
"
sink
"
server (default
1024
)
-s operate as server instead of client
-t n set multicast ttl
-u use UDP instead of TCP
-v verbose
-w n #bytes per write() for
"
source
"
client (default
1024
)
-x n #ms for SO_RCVTIMEO (receive timeout)
-y n #ms for SO_SNDTIMEO (send timeout)
-A SO_REUSEADDR option
-B SO_BROADCAST option
-C set terminal to cbreak mode
-D SO_DEBUG option
-E IP_RECVDSTADDR option
-F fork after connection accepted (TCP concurrent server)
-G a.b.c.d strict source route
-H n IP_TOS option (
16
=
min del
,
8
=
max thru
,
4
=
max rel
,
2
=
min$)
-I SIGIO signal
-J n IP_TTL option
-K SO_KEEPALIVE option
-L n SO_LINGER option
,
n
=
linger time
-N TCP_NODELAY option
-O n #ms to pause after listen
,
but before first accept
-P n #ms to pause before first read or write (source/sink)
-Q n #ms to pause after receiving FIN
,
but before close
-R n SO_RCVBUF option
-S n SO_SNDBUF option
-T SO_REUSEPORT option
-U n enter urgent mode before write number n (source only)
-V use writev() instead of write()
;
enables -k too
-W ignore write errors for sink client
-X n TCP_MAXSEG option (set MSS)
-Y SO_DONTROUTE option
-Z MSG_PEEK
posted on 2008-04-13 20:54
wei
阅读(513)
评论(1)
编辑
收藏
引用
所属分类:
linux
Comments
#
re: sock-Richard Stevens' sock program[未登录]
jacky
sock是Richard Steven自己写的程序吗?UNIX系统中怎么没有这个命令?
Posted @ 2010-03-11 15:13
回复
更多评论
刷新评论列表
只有注册用户
登录
后才能发表评论。