开发者

How to 'pipe' or 'chain' output of a server socket to the input of another server socket similar to sendfile?

In开发者_如何学运维 Linux, using sendfile you can directly transfer file out to a socket.

But let's say we have two server socket, we want to the output of the first one to go out to the second one.

How to do that? Instead of

data=sock1.read()
sock2.write(data)


I believe dup2 will work

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜