From 78f61191960c51f95968bbe5eee57eddeed310bd Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 22 Aug 2012 01:12:00 +0900 Subject: [PATCH] python: add config argument to Session.__init__ --- doc/python.rst | 7 ++++--- python/spdylay.pyx | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/python.rst b/doc/python.rst index 3bc57ff..cebe646 100644 --- a/doc/python.rst +++ b/doc/python.rst @@ -22,7 +22,7 @@ To build extension, run ``setup.py``:: Session objects --------------- -.. py:class:: Session(side, version, send_cb=None, recv_cb=None, on_ctrl_recv_cb=None, on_data_chunk_recv_cb=None, on_stream_close_cb=None, on_request_recv_cb=None, user_data=None) +.. py:class:: Session(side, version, config=None, send_cb=None, recv_cb=None, on_ctrl_recv_cb=None, on_data_chunk_recv_cb=None, on_stream_close_cb=None, on_request_recv_cb=None, user_data=None) This is the class to hold the resources needed for a SPDY session. Sending and receiving SPDY frames are done using the methods of @@ -328,8 +328,9 @@ Session objects If *flags* includes :py:const:`CTRL_FLAG_FIN`, this frame has FLAG_FIN flag set. - The *assoc_stream_id* is used for server-push. If session is - initialized for client use, *assoc_stream_id* is ignored. + The *assoc_stream_id* is used for server-push. Specify 0 if this + stream is not server-push. If session is initialized for client + use, *assoc_stream_id* is ignored. The *pri* is priority of this request. ``0`` is the highest priority value. Use :py:meth:`get_pri_lowest()` to know the lowest diff --git a/python/spdylay.pyx b/python/spdylay.pyx index 5cfa080..4258417 100644 --- a/python/spdylay.pyx +++ b/python/spdylay.pyx @@ -401,7 +401,7 @@ cdef class Session: def __get__(self): return self.user_data - def __cinit__(self, side, version, + def __cinit__(self, side, version, config=None, send_cb=None, recv_cb=None, on_ctrl_recv_cb=None, on_data_chunk_recv_cb=None, @@ -468,7 +468,7 @@ cdef class Session: elif rv == cspdylay.SPDYLAY_ERR_UNSUPPORTED_VERSION: raise UnsupportedVersionError(cspdylay.spdylay_strerror(rv)) - def __init__(self, side, version, + def __init__(self, side, version, config=None, send_cb=None, recv_cb=None, on_ctrl_recv_cb=None, on_data_chunk_recv_cb=None,