Set a write handler, and possibly enable a write barrier, this flag is * cleared when write handler is changed or removed. * With barrier enabled, we never fire the event if the read handler already * fired in the same event loop iteration. Useful when you want to persist * things to disk before sending replies, and want to do that in a group fashion. */
| 179 | * fired in the same event loop iteration. Useful when you want to persist |
| 180 | * things to disk before sending replies, and want to do that in a group fashion. */ |
| 181 | static inline int connSetWriteHandlerWithBarrier(connection *conn, ConnectionCallbackFunc func, int barrier, bool fThreadSafe = false) { |
| 182 | return conn->type->set_write_handler(conn, func, barrier, fThreadSafe); |
| 183 | } |
| 184 | |
| 185 | static inline void connClose(connection *conn) { |
| 186 | conn->type->close(conn); |
no outgoing calls
no test coverage detected