Commit Graph

141 Commits

Author SHA1 Message Date
J. Nick Koston b22258cca7
Small speed up to writing outgoing packets (#785) 2023-12-04 15:59:33 -10:00
J. Nick Koston 3e920df478
Handle Bluetooth connection drops in more places (#766) 2023-11-28 07:23:21 -06:00
J. Nick Koston 1b51530642
Reduce duplicate code between connection and frame helper (#763) 2023-11-27 23:51:38 -06:00
J. Nick Koston ab5834ca0d
Fix not backing off when connection requires encryption (#762) 2023-11-27 18:39:22 -06:00
J. Nick Koston 18401dd7ed
Add some additional cython types to the connection module (#716) 2023-11-25 10:30:17 -06:00
J. Nick Koston 4230871761
Cleanup protobuf object construction (#715) 2023-11-25 10:18:04 -06:00
J. Nick Koston 1360dd136a
Remove unused constants from connection module (#714) 2023-11-25 10:11:21 -06:00
J. Nick Koston 66e654084b
Add test for unexpected hello responses (#712) 2023-11-25 09:58:30 -06:00
J. Nick Koston 79686bf729
Fix client connection code swallowing unhandled exceptions as debug logging (#711) 2023-11-25 09:33:43 -06:00
J. Nick Koston 2f49f804e5
Remove unreachable socket buffering check code in connection (#710) 2023-11-25 09:06:28 -06:00
J. Nick Koston d592f1e7ab
Reverse future done checks so we know they are actually reachable (#708) 2023-11-25 08:49:54 -06:00
J. Nick Koston 3711d54ffa
Add test for trying to finish an unstarted connection (#706) 2023-11-25 08:44:25 -06:00
J. Nick Koston 3abf9ff8d4
Make force_disconnect a normal function (#705) 2023-11-25 08:39:04 -06:00
J. Nick Koston 402d6fe113
Remove unreachable check in connection send_messages (#704) 2023-11-25 08:32:27 -06:00
J. Nick Koston b67e19bd94
Add test for attempting to reuse an APIConnection object raises (#703) 2023-11-25 08:18:08 -06:00
J. Nick Koston 554190228e
Remove unreachable code in connection (#702) 2023-11-25 08:10:37 -06:00
J. Nick Koston 9edba66d30
Add test coverage for invalid protobuf messages (#701) 2023-11-25 08:10:26 -06:00
J. Nick Koston 67661dbd7f
Avoid expensive debug logging checks in packet processor (#700) 2023-11-25 07:51:48 -06:00
J. Nick Koston e01f22d99a
Fix race in cleaning up connection (#698) 2023-11-25 07:11:34 -06:00
J. Nick Koston 83b4f43610
Refactor frame helper to get debug state from connection (#679) 2023-11-23 12:20:52 -06:00
J. Nick Koston 1cc6b3ed52
Fix missed GATT notify if the device responds immediately after subscribe (#669) 2023-11-23 09:46:56 -06:00
J. Nick Koston 2501ea4275
Add additional coverage for starting noise connections (#653) 2023-11-21 16:42:23 +01:00
J. Nick Koston 0afa8c6832
Remove in_do_connect contextvar (#652) 2023-11-21 15:36:43 +01:00
J. Nick Koston f88b15e33b
Fix `eof_received` not raising SocketClosedAPIError (#651) 2023-11-21 14:56:31 +01:00
J. Nick Koston 298aa01b00
Small cleanups to connection (#648) 2023-11-21 13:08:48 +01:00
J. Nick Koston f783438a7d
Ensure expected_disconnect is True when sending DisconnectResponse fails (#646) 2023-11-20 19:08:29 +01:00
J. Nick Koston b12903e2e7
Refactor zeroconf code to avoid creating instances when one is unneeded (#643) 2023-11-17 13:11:36 -06:00
J. Nick Koston 3ccb36b6fc
Refactor frame helper to avoid py conversions when processing packets (#641) 2023-11-16 12:24:50 -06:00
J. Nick Koston d6293d9177
Refactor frame helper to allow sending multiple packets at once (#640) 2023-11-16 10:31:02 -06:00
dependabot[bot] f1956aa598
Bump mypy from 1.6.1 to 1.7.0 (#638)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-11-13 22:22:43 -06:00
J. Nick Koston a15b96c76b
Send hello and login asynchronously to speed up connecting (#628) 2023-11-09 19:17:53 -06:00
J. Nick Koston 7ac7742c91
Ensure passed params are always a str (#622) 2023-11-08 17:26:51 -06:00
J. Nick Koston 8357a3a0c6
Remove extra timeouts (#610) 2023-10-31 23:20:22 -05:00
J. Nick Koston 1d2682a76e
Improve logging on clean disconnect failure (#609) 2023-10-31 23:07:40 -05:00
J. Nick Koston e1c42e95bf
Ensure frame_helper is always closed before the underlying socket (#602) 2023-10-23 19:22:08 -05:00
J. Nick Koston 1630816dc8
Fix unhandled exception when handshake times out (#601) 2023-10-23 12:32:20 -05:00
J. Nick Koston 8c37f088d4
Refactor internal message handlers to use a single dispatch path (#598) 2023-10-22 07:05:53 -10:00
J. Nick Koston 359ed510a2
Move mypy disable for async_timeout to mypy.ini (#593) 2023-10-20 06:25:20 -10:00
J. Nick Koston f31b250fe2
Remove unless local variable in _connect_resolve_host (#588) 2023-10-17 14:05:39 -10:00
J. Nick Koston c5f4bfa561
Small reduction in connect overhead (#578) 2023-10-15 12:01:00 -10:00
J. Nick Koston b7449d4ded
Split connection process to enable faster reconnects (#576) 2023-10-14 16:03:12 -10:00
J. Nick Koston dc367b67bb
Narrow msg_types to only accept tuples (#574) 2023-10-13 18:25:27 -10:00
J. Nick Koston 74facc8fef
Improve performance of processing incoming packets (#573) 2023-10-13 18:01:34 -10:00
J. Nick Koston f9fa36a89c
Remove async_timeout requirement on python 3.11+ (#570) 2023-10-12 10:03:30 -10:00
J. Nick Koston 2c6f3d40ed
Add optional basic cython implementation for frame_helper (#564) 2023-10-12 08:12:39 -10:00
J. Nick Koston 275ca3a660
Run tests on multiple python versions (#566) 2023-10-11 12:52:19 -10:00
J. Nick Koston 96a448b02c
Fix bad except clauses order (#565) 2023-10-11 12:22:50 -10:00
J. Nick Koston aecade1e1b
Small cleanups to connection code (#554) 2023-09-24 23:26:52 +02:00
J. Nick Koston 11a19438cb
Avoid a few calls to fetch loop time (#533) 2023-09-04 12:56:23 -05:00
J. Nick Koston 3bb2c085e6
Increase SO_RCVBUF to 2MiB to reduce chance of ESP32 cam disconnects (#515) 2023-07-27 08:47:01 -05:00