Commit Graph

17 Commits

Author SHA1 Message Date
94483714a3 run lint and fix errors, except mypy 2024-02-19 16:05:58 -07:00
f0df2d189f Plaintext: use existing msgio reader 2020-02-28 15:49:59 +08:00
3db297fbee Fix mypy errors 2019-10-24 08:53:19 +02:00
eef505f2d9 Add automatic docstring formatter and apply 2019-10-24 08:41:10 +02:00
7405f078e6 Raise read_delim exception with different msgs
Separate `len(msg_bytes) == 0` and `msg_bytes[-1:] != b"\n"`, to raise
`ParseError` with different messages.
2019-09-24 13:22:25 +08:00
95ae718e3d Raise ParseError in read_delim 2019-09-23 16:01:22 +08:00
e44c2145cc Merge branch 'master' into fix/detection-of-close 2019-09-21 18:05:54 +08:00
2d8e02b7eb Add detection for disconnections in mplex 2019-09-19 15:55:26 +08:00
879f193aa1 Handle errors from
- `read_delim`
    - `read_varint_prefixed_bytes`
    - `decode_uvarint_from_stream`
2019-09-15 16:58:08 +08:00
b2146c5268 Don't crash on large messages 2019-09-09 17:13:26 -04:00
10415cb956 Use ReadWriteCloser for conns and streams 2019-09-05 23:24:17 +08:00
fc3e3a4be5 Changes to type hints to match new abstractions 2019-09-04 10:12:43 -07:00
b6c8ab0dc9 Fix #259: Use the unsigned LEB128 impl from py-wasm
Reference: https://github.com/ethereum/py-wasm/blob/master/wasm/parsers/leb128.py
2019-08-26 20:41:10 +08:00
0b466ddc86 Add lock to RawConnection
To avoid `self.writer.drain()` is called in parallel.
Reference: https://bugs.python.org/issue29930
2019-08-22 22:53:47 +08:00
bb7d37fd4f Fix msg encoding
- Change varint-prefix encode to fixedint-prefix(4 bytes) encode.
2019-08-22 22:53:46 +08:00
22b1a5395d A working plaintext 2.0 without validation 2019-08-22 22:53:46 +08:00
a0923d202a Move varint and delim read/write to toplevel
To `libp2p.utils`.
2019-08-22 22:53:46 +08:00