conn->v.handshake_ready(conn);
}
+bool connection_handshake_received(struct connection *conn)
+{
+ return conn->handshake_finished.tv_sec != 0;
+}
+
static void connection_closed(struct connection *conn,
enum connection_disconnect_reason reason)
{
vfunctions return success and will call the handshake_ready() vfunction. */
void connection_set_handshake_ready(struct connection *conn);
+/* Returns TRUE if handshake has been done */
+bool connection_handshake_received(struct connection *conn);
+
/* Returns -1 = disconnected, 0 = nothing new, 1 = something new.
If input_full_behavior is ALLOW, may return also -2 = buffer full. */
int connection_input_read(struct connection *conn);