604a447287
feat: add identify protocol example
2025-03-24 17:55:16 -06:00
b2a6294cfa
feat(host): add get_live_peers() to track connection state
2025-03-23 15:01:18 -06:00
d7eab27564
refactored and moved all interfaces to abc.py ( #504 )
...
* refactored : host_interface
Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com >
* refactored : network_interface
Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com >
* refactored : notifee_interface
Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com >
* refactored : net_connection_interface
Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com >
* refactored: raw_connection_interface, secure_conn_interface and stream_muxer abc.py
* refactored: addrbook_interface
* refactored :peerdata_interface
Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com >
* refactored :peermetadata_interface
Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com >
* refactored :multiselect_client_interface
Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com >
* refactored :multiselect_communicator_interface
Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com >
* refactored :multiselect_muxer_interface
Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com >
* refactored :interfaces
Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com >
* refactored :security_transport_interface
Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com >
* refactored :listener_interface
Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com >
* moved all interfaces and typing files
Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com >
* fixed documentation and moved pubsub abc.py
Co-authored-by: Khwahish Patel <khwahish.p1@ahduni.edu.in >
* added exclude-members in custom_types docs
* added : newsfragment for moving all interfaces to libp2p.abc
---------
Co-authored-by: mystical-prog <jdgt.vd.0405@gmail.com >
Co-authored-by: Mystical <125946525+mystical-prog@users.noreply.github.com >
2025-02-21 16:01:45 -07:00
e7a9ee78a8
rename typing.py to custom_types.py for clarity
2025-02-02 07:18:52 -07:00
8787613e91
run lint with pyupgrade at py39-plus
2025-01-25 15:48:39 -07:00
17575f4a38
added test for connected peers
2024-11-21 11:51:19 -07:00
847dfa6577
added getter for connected peers
2024-11-21 11:51:19 -07:00
25b35dee1a
fixed lint
2024-10-29 14:05:01 -06:00
cd810d26c2
added PingService
2024-10-29 14:05:01 -06:00
d9b92635c1
drop async-service dep and copy relevant code into a local async_service
...
tool, updated for modern handling of ExceptionGroup
2024-05-27 12:14:36 -06:00
827d16b106
import asynccontextmanager from context lib and remove async_generator dep
2024-04-27 10:12:39 -06:00
8dda7b933e
turn mypy checks back on, fix some errors
2024-04-27 10:12:39 -06:00
94483714a3
run lint and fix errors, except mypy
2024-02-19 16:05:58 -07:00
f1dbd52d67
Merge branch 'master' into feature/trio
2020-02-06 10:39:54 +08:00
5da102d1c9
Ping protocol: move with statement out of try
2020-02-04 15:09:42 +08:00
6e01a7da31
PR feedback: async with host.run()
2020-01-26 16:44:42 +08:00
ce5663705f
Merge branch 'master' into feature/porting-to-trio
2019-12-24 02:19:43 +08:00
b1248ff315
enforced f-strings everywhere, %s on logging
...
extended _multiaddr_from_socket to support UDP and IPv6 automatically
changed TCPListener to use _ip4_or_6_from_multiaddr to get host, and not ip4 only
enforced `from error` everywhere with raises
added call braces to exceptions
2019-12-19 17:31:18 +01:00
1929f307fb
Fix all modules except for security
2019-12-06 17:06:37 +08:00
eb494e8682
Fix ping protocol
2019-12-01 19:17:32 +08:00
566e4c080d
Fix lint
2019-11-25 17:32:53 +08:00
e49de15227
Add get_private_key to Host
2019-11-25 16:57:00 +08:00
a63f00d8f8
Store our pubkey/privkey info during
...
`initialize_default_swarm`
2019-11-25 16:55:55 +08:00
cbe57cd5d7
Fix lint
2019-11-16 16:56:59 +08:00
86e0fa4563
Handle StreamClosed in ping protocol handler
2019-11-16 16:56:59 +08:00
4b01c33d54
add some additional logging
2019-11-07 20:57:43 -08:00
9a23609b48
type protocol IDs to satisfy mypy
2019-11-07 07:51:44 -08:00
ed81562a89
Add identify and ping as default protocols
2019-11-07 07:51:43 -08:00
9500bdbf55
Add class attribute for additional property
2019-11-06 12:11:09 -08:00
0ca3e83540
lintroll
2019-11-06 11:41:28 -08:00
693a8cf99a
Default protocols are constructed using a reference to the host
2019-11-06 11:41:28 -08:00
32c55bcaf2
hosts track their public key
2019-11-06 11:41:27 -08:00
c30d9ce397
Fix linter error from merge in #315 .
2019-11-05 17:50:43 -08:00
700209c50a
Merge pull request #315 from ralexstokes/add-ping-protocol
...
Add `ping` protocol.
2019-11-06 10:14:39 +09:00
ded3792924
Merge pull request #331 from dmuhs/fix/docs-format
...
Add automatic docstring formatting
2019-10-28 09:39:52 -06:00
bafdd8512d
Enforce pre-summary newline in docstrings
2019-10-24 20:10:45 +02:00
1cf239cce6
Respect a remote close during the ping protocol
2019-10-24 19:44:52 +09:00
e157c3f654
typing fixes
2019-10-24 18:10:56 +09:00
f24b488f79
handle other side closing their end of the connection during ping
2019-10-24 18:10:56 +09:00
4a800e5c56
Add first-pass at ping protocol
2019-10-24 18:10:55 +09:00
15cabb1c33
Copy default data to avoid undesirable mutations
2019-10-24 17:29:33 +09:00
c92bade815
Add "default protocols" that all hosts have by default
2019-10-24 17:29:16 +09:00
eef505f2d9
Add automatic docstring formatter and apply
2019-10-24 08:41:10 +02:00
ac9feef26c
Pull request feedback
2019-10-15 20:32:25 +02:00
d1d91e4091
Refactored for 'lint' testenv
2019-10-15 19:02:03 +02:00
8143563831
Added tests for 'RoutedHost' and modified 'FindPeer'
2019-10-15 01:01:16 +02:00
3f24b015ab
Implemented Host that includes a routing system. Explicitly separating different Host types as in Go implementation
2019-10-14 00:29:28 +02:00
986a852e7e
Remove forced debug level
2019-10-01 11:17:05 +02:00
6f8394e4bd
Merge branch 'master' into fix/change-notifee-and-add-tests-for-swarm-conn-and-mplex
2019-09-21 18:34:12 +08:00
e44c2145cc
Merge branch 'master' into fix/detection-of-close
2019-09-21 18:05:54 +08:00