0

i need to to be able to receive a large amount of messages which may arrive at the same time, store and append these messages and reply to each message with 'ok'. I have tried socat TCP-LISTEN:5678,reuseaddr,fork open:/home/derek/raw2.txt,system:'echo +OK' and various combinations to do this but cannot get it all to work. I am able to either receive a message and send back 'ok' or receive a message and store it. I am unable to get my brain cell to do both together. Any help would be appreciated.

4

1 回答 1

0

虽然这个问题现在已经很老了,但这会奏效:

socat tcp-listen:5678,reuseaddr,fork 'system:echo +OK!!open:recv.data,create,append'

来源:双地址间

于 2014-04-10T14:45:33.670 回答