Skip to content

Commit d2253f2

Browse files
committed
documentation update
1 parent aff7818 commit d2253f2

File tree

9 files changed

+59
-5
lines changed

9 files changed

+59
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,4 @@ ENV/
9191
# PyCharm
9292
*.iml
9393
.idea/
94+
python311/

docs/api.rst

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,43 @@ Transports
6565

6666
.. automodule:: rsocket.transports.transport
6767
:members:
68+
69+
70+
71+
72+
TCP
73+
~~~
74+
75+
.. automodule:: rsocket.transports.tcp
76+
:members:
77+
78+
79+
Quart
80+
~~~~~
81+
82+
.. automodule:: rsocket.transports.quart_websocket
83+
:members:
84+
85+
AIOHttp
86+
~~~~~~~
87+
88+
.. automodule:: rsocket.transports.aiohttp_websocket
89+
:members:
90+
91+
AIOQuic
92+
~~~~~~~
93+
94+
.. automodule:: rsocket.transports.aioquic_transport
95+
:members:
96+
97+
HTTP3
98+
~~~~~
99+
100+
.. automodule:: rsocket.transports.http3_transport
101+
:members:
102+
103+
Websockets
104+
~~~~~~~~~~
105+
106+
.. automodule:: rsocket.transports.asyncwebsockets_transport
107+
:members:

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
'sphinx.ext.autodoc',
3636
'sphinx.ext.autosummary',
3737
"sphinx.ext.napoleon",
38-
"sphinx.ext.viewcode"
38+
"sphinx.ext.viewcode",
3939
]
4040

4141
# Add any paths that contain templates here, relative to this directory.

rsocket/request_handler.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ async def request_channel(self,
3333
) -> Tuple[Optional[Publisher], Optional[Subscriber]]:
3434
"""
3535
Bi-Directional communication. A publisher on each end is connected
36-
to a subscriber on the other end.
36+
to a subscriber on the other end. Note that the first payload sent to the handler is passed as
37+
an argument to this method and not to the local subscriber.
3738
"""
3839

3940
@abstractmethod

rsocket/rsocket_client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class RSocketClient(RSocketBase):
2424
:param transport_provider: Async generator which returns `Transport` to use with this instance.
2525
:param request_queue_size: Number of frames which can be queued while waiting for a lease.
2626
:param fragment_size_bytes: Minimum 64, Maximum depends on transport.
27+
:param handler_factory: Callable which returns the implemented application logic endpoints. See also :class:`RequestRouter <rsocket.routing.request_router.RequestRouter>`
2728
"""
2829

2930
def __init__(self,

rsocket/rsocket_server.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ class RSocketServer(RSocketBase):
1515
"""
1616
Server side instance of an RSocket connection.
1717
18-
:param transport: Transport to use with this instance. See `Transport` class implementations.
18+
:param transport: Transport to use with this instance. See :class:`Transport <rsocket.transports.transport.Transport>` class implementations.
1919
:param request_queue_size: Number of frames which can be queued while waiting for a lease.
2020
:param fragment_size_bytes: Minimum 64, Maximum depends on transport.
2121
:param on_ready: Called after the RSocket server internals setup is done.
22+
:param handler_factory: Callable which returns the implemented application logic endpoints. See also :class:`RequestRouter <rsocket.routing.request_router.RequestRouter>`
2223
"""
2324

2425
def __init__(self,

rsocket/transports/aioquic_transport.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ def protocol_factory(*protocol_args, **protocol_kwargs):
5757

5858

5959
class RSocketQuicProtocol(QuicConnectionProtocol):
60+
"""
61+
RSocket transport over server side quic.
62+
"""
6063
def __init__(self, *args, **kwargs):
6164
super().__init__(*args, **kwargs)
6265
self.frame_queue = asyncio.Queue()

rsocket/transports/quart_websocket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ async def websocket_handler(on_server_create=None, **kwargs):
2525

2626
class TransportQuartWebsocket(AbstractMessagingTransport):
2727
"""
28-
RSocket transport over server side quart websocket.
28+
RSocket transport over server side quart websocket. Use the :method:`websocket_handler <rsocket.transports.quart_websocket.websocket_handler>` helper method to instantiate.
2929
"""
3030

3131
async def handle_incoming_ws_messages(self):

rsocket/transports/transport.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,14 @@
66

77
class Transport(metaclass=abc.ABCMeta):
88
"""
9-
Base class for all transports.
9+
Base class for all transports:
10+
11+
- tcp: :class:`TransportTCP <rsocket.transports.tcp.TransportTCP>`
12+
- websocket: :class:`TransportAsyncWebsocketsClient <rsocket.transports.asyncwebsockets_transport.TransportAsyncWebsocketsClient>`
13+
- http3: :class:`Http3TransportWebsocket <rsocket.transports.http3_transport.Http3TransportWebsocket>`
14+
- aioquic: :class:`RSocketQuicProtocol <rsocket.transports.aioquic_transport.RSocketQuicProtocol>`
15+
- aiohttp: :class:`TransportAioHttpWebsocket <rsocket.transports.aiohttp_websocket.TransportAioHttpWebsocket>`
16+
- quart: :class:`TransportQuartWebsocket <rsocket.transports.quart_websocket.TransportQuartWebsocket>`
1017
"""
1118

1219
def __init__(self):

0 commit comments

Comments
 (0)