NIC619
19907e18ec
Replace (check and) del pattern with pop method
2019-11-20 23:06:37 +08:00
NIC619
c0522c1bd9
Check if entry exists in dictionary before delete
2019-11-17 21:52:05 +08:00
Dominik Muhs
bafdd8512d
Enforce pre-summary newline in docstrings
2019-10-24 20:10:45 +02:00
Dominik Muhs
3db297fbee
Fix mypy errors
2019-10-24 08:53:19 +02:00
Dominik Muhs
eef505f2d9
Add automatic docstring formatter and apply
2019-10-24 08:41:10 +02:00
mhchia
82dc5d9e31
Ignore typing for asyncio.wait
2019-10-02 15:45:54 +08:00
mhchia
a9ad37bc6f
Add mplex tests and fix error in SwarmConn.close
2019-09-19 16:31:41 +08:00
mhchia
5307c0506b
Change IMuxedConn
to INetConn
in Notifee
2019-09-19 16:31:41 +08:00
mhchia
4a689c7d57
Fix error when reset
...
If `Mplex` is cleanup first, `MplexStream.reset` possibly fails because
`Mplex.streams` is set to `None` in `cleanup`.
2019-09-19 15:55:27 +08:00
mhchia
31fb4e0b69
Rewrite _wait_for_data
, to handle task precisely
...
Make the futures first, and then we can compare them with the return
value from `asyncio.wait`.
2019-09-10 23:38:45 +08:00
mhchia
df87f5adb9
Add tests against the daemon for close/reset
2019-09-10 18:01:16 +08:00
mhchia
e5eb01d22b
Fix stream read
2019-09-10 18:01:16 +08:00
mhchia
df312f3e57
Fix linting
2019-09-10 18:01:15 +08:00
mhchia
be2c0f122a
Fix close behavior
2019-09-10 18:01:14 +08:00
mhchia
6c1f77dc1a
Fix: Change the event.close
to event.set
...
And add missing parts.
2019-09-06 21:35:15 +08:00
mhchia
649a230776
Fix MplexStream.read
2019-09-06 17:26:40 +08:00
mhchia
95926b7376
Temp for mplex_stream
2019-09-06 01:08:42 +08:00
mhchia
eac159c527
Restructure mplex and mplex_stream
2019-09-05 22:29:33 +08:00
mhchia
96230758e4
Add events in MplexStream
...
And modify a little bit of `close` and `reset`
2019-09-05 18:18:39 +08:00
mhchia
d35b8ffc64
Conform stream_id
to go-mplex
2019-08-28 21:43:34 +08:00
Alex Stokes
a193ae81fd
Fix typo w/ header tag under different reset scenarios
2019-08-26 11:39:30 -07:00
mhchia
d59870ebbf
Fix MplexStream
error
...
When receiving a `NewStream`, the message of that packet is the
name of the stream, which should be handled, rather than letting it go
into the message queue.
2019-08-26 20:39:08 +08:00
mhchia
c5f32bf431
PR feedback for MplexStream.read
2019-08-16 11:03:16 +08:00
Kevin Mai-Husan Chia
8699568d43
Update libp2p/stream_muxer/mplex/mplex_stream.py
...
Co-Authored-By: Alex Stokes <r.alex.stokes@gmail.com>
2019-08-16 11:03:16 +08:00
mhchia
b27cd0f24f
Use bytearray
over bytes
...
To avoid copies.
2019-08-16 11:03:16 +08:00
mhchia
f281e3e1db
flake8
2019-08-16 11:03:16 +08:00
mhchia
9f8276fa84
Support read(n=-1)
...
Now, `n=-1` indicates that we want to read until EOF. However, now we
only read until we have no new message.
2019-08-16 11:03:16 +08:00
mhchia
9cb6ec1c48
Modify the behavior of MplexStream.read
2019-08-16 11:03:16 +08:00
mhchia
2485a00e24
Modify NetStream
to read n bytes
2019-08-16 11:03:16 +08:00
Alex Stokes
3debd2c808
Run black
and isort
w/ the new config
2019-08-13 14:36:42 -07:00
Chih Cheng Liang
cb3a59e0ac
ttl as int
2019-08-05 17:02:18 +08:00
Chih Cheng Liang
e763f57930
run isort
2019-08-05 11:47:23 +08:00
Chih Cheng Liang
7a04ebb51f
run black
2019-08-05 11:21:20 +08:00
Chih Cheng Liang
9e0a806218
move stream and connection interfaces to abc
2019-08-05 11:17:38 +08:00
Chih Cheng Liang
87ef2e4618
remove if TYPE_CHECKING as much as possible
2019-08-05 10:46:49 +08:00
Chih Cheng Liang
4c9a930f84
stream_muxer done
2019-08-05 10:45:47 +08:00
Chih Cheng Liang
239a5c88fb
add typing to mplex
2019-08-05 10:45:46 +08:00
Chih Cheng Liang
36b7e8ded9
Refactor HeaderTags
2019-08-05 10:45:46 +08:00
Alex Stokes
7477b29508
run black w/ extended line length
2019-08-04 12:37:41 +08:00
mhchia
2e94fcf56c
Remove pylint:disable
2019-08-02 23:26:06 +08:00
Alex Stokes
0ae9840928
Run black
over repo
2019-07-31 15:00:12 -07:00
NIC619
e53727d301
Apply PR feedback: fix type hints
2019-07-30 16:28:25 +08:00
Robert Zajac
82840b5e6c
Stream rearchitecture ( #126 )
...
* Add generic protocol handler
* Add generic protocol handler to stream muxing pipeline
* Modify conn_handler to only deal with connections
* mplex accept stream architecture changes
* Add create generic protocol handler
* Fix minor bugs
* who would win 4 devs or one not
* Debugging
* rearch with handle_incoming infinite loop, seems to work, needs cleanup"
* passing linting, still needs cleanup
* fixing linting again; code still needs cleanup
* fixing tests; code still needs cleanup
* adding test cleanup and task cleanup, removing prints
* linting, and cleanup complete
* storing connections based on peer id
* remove dead code
* remove unnecessary peer_id
2019-02-24 20:58:23 -05:00
Alexander Koshkin
ce6ddb27a9
Migrate to new project structure.
2019-01-09 21:38:56 +03:00