MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / connTLSSetWriteHandler

Function connTLSSetWriteHandler

src/tls.cpp:1136–1151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1134}
1135
1136int connTLSSetWriteHandler(connection *conn, ConnectionCallbackFunc func, int barrier, bool fThreadSafe) {
1137 serverAssert(((tls_connection*)conn)->el == serverTL->el);
1138 conn->write_handler = func;
1139 if (barrier)
1140 conn->flags |= CONN_FLAG_WRITE_BARRIER;
1141 else
1142 conn->flags &= ~CONN_FLAG_WRITE_BARRIER;
1143
1144 if (fThreadSafe)
1145 conn->flags |= CONN_FLAG_WRITE_THREADSAFE;
1146 else
1147 conn->flags &= ~CONN_FLAG_WRITE_THREADSAFE;
1148
1149 updateSSLEvent((tls_connection *) conn);
1150 return C_OK;
1151}
1152
1153int connTLSSetReadHandler(connection *conn, ConnectionCallbackFunc func, bool fThreadSafe) {
1154 serverAssert(((tls_connection*)conn)->el == serverTL->el);

Callers

nothing calls this directly

Calls 1

updateSSLEventFunction · 0.85

Tested by

no test coverage detected