Output command to socket without buffering using M

2019-07-23 14:14发布

How to do continiously output of command (for me it's long ping) in real-time mode on Mojo server? I'm looking for some example on Mojo::IOLoop. For example, client connects to server and requests for ping X.X.X.X, server returns an non-buffered output (while ping on server return each line to output, client receive this line from socket), after that — server must drop the connection.

0条回答
登录 后发表回答