aboutsummaryrefslogtreecommitdiff
path: root/src/microspdy/structures.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/microspdy/structures.h')
-rw-r--r--src/microspdy/structures.h44
1 files changed, 40 insertions, 4 deletions
diff --git a/src/microspdy/structures.h b/src/microspdy/structures.h
index 603449f1..529bc929 100644
--- a/src/microspdy/structures.h
+++ b/src/microspdy/structures.h
@@ -29,6 +29,7 @@
29#include "platform.h" 29#include "platform.h"
30#include "microspdy.h" 30#include "microspdy.h"
31#include "tls.h" 31#include "tls.h"
32#include "io.h"
32 33
33 34
34/** 35/**
@@ -617,10 +618,10 @@ struct SPDY_Session
617 struct SPDYF_Stream *streams_tail; 618 struct SPDYF_Stream *streams_tail;
618 619
619 /** 620 /**
620 * Unique TLS context for the session. Initialized on each creation 621 * Unique IO context for the session. Initialized on each creation
621 * (actually when the TCP connection is established). 622 * (actually when the TCP connection is established).
622 */ 623 */
623 SPDYF_TLS_SESSION_CONTEXT *tls_context; 624 void *io_context;
624 625
625 /** 626 /**
626 * Head of doubly-linked list of the responses. 627 * Head of doubly-linked list of the responses.
@@ -659,6 +660,31 @@ struct SPDY_Session
659 void *user_cls; 660 void *user_cls;
660 661
661 /** 662 /**
663 * Function to initialize the IO context for a new session.
664 */
665 SPDYF_IONewSession fio_new_session;
666
667 /**
668 * Function to deinitialize the IO context for a session.
669 */
670 SPDYF_IOCloseSession fio_close_session;
671
672 /**
673 * Function to read data from socket.
674 */
675 SPDYF_IORecv fio_recv;
676
677 /**
678 * Function to write data to socket.
679 */
680 SPDYF_IOSend fio_send;
681
682 /**
683 * Function to check for pending data in IO buffers.
684 */
685 SPDYF_IOIsPending fio_is_pending;
686
687 /**
662 * Number of bytes that the lib must ignore immediately after they 688 * Number of bytes that the lib must ignore immediately after they
663 * are read from the TLS socket without adding them to the read buf. 689 * are read from the TLS socket without adding them to the read buf.
664 * This is needed, for instance, when receiving frame bigger than 690 * This is needed, for instance, when receiving frame bigger than
@@ -805,9 +831,9 @@ struct SPDY_Daemon
805 struct SPDY_Session *cleanup_tail; 831 struct SPDY_Session *cleanup_tail;
806 832
807 /** 833 /**
808 * Unique TLS context for the daemon. Initialized on daemon start. 834 * Unique IO context for the daemon. Initialized on daemon start.
809 */ 835 */
810 SPDYF_TLS_DAEMON_CONTEXT *tls_context; 836 void *io_context;
811 837
812 /** 838 /**
813 * Certificate file of the server. File path is kept here. 839 * Certificate file of the server. File path is kept here.
@@ -864,6 +890,16 @@ struct SPDY_Daemon
864 void *fcls; 890 void *fcls;
865 891
866 /** 892 /**
893 * Function to initialize the IO context for the daemon.
894 */
895 SPDYF_IOInit fio_init;
896
897 /**
898 * Function to deinitialize the IO context for the daemon.
899 */
900 SPDYF_IODeinit fio_deinit;
901
902 /**
867 * After how many seconds of inactivity should 903 * After how many seconds of inactivity should
868 * connections time out? Zero for no timeout. 904 * connections time out? Zero for no timeout.
869 */ 905 */