folly::AsyncPipeReader::setCloseCallback

Set a special hook to close the socket (otherwise, will call close())

Synopsis

Declared in <folly/io/async/AsyncPipe.h>

void
setCloseCallback(std::function<void(NetworkSocket)> closeCb);

Parameters

NameDescription
closeCbThe hook invoked to close the pipe file descriptor.