Skip to content

Refactor TCP server to asyncio-based server#118

Merged
arnobaer merged 3 commits intomainfrom
refactor/asyncio-emulator-tcpserver
Mar 25, 2026
Merged

Refactor TCP server to asyncio-based server#118
arnobaer merged 3 commits intomainfrom
refactor/asyncio-emulator-tcpserver

Conversation

@arnobaer
Copy link
Copy Markdown
Member

This PR replaces the existing TCP socketserver implementation with an asyncio drop-in replacement.

  • replace socketserver with asyncio.start_server
  • preserve existing behavior and interface
  • switch signal handling to asyncio-native approach
  • add KeyboardInterrupt fallback for unsupported platforms
  • improve shutdown reliability via finally block

Moving to asyncio enables non-blocking I/O and better integration with async workflows, while keeping the server usable exactly as before.

This also adds a logging warning when the deprecated module keyword is used in an emulators.yaml config file.

- replace TCPServer/socketserver with asyncio.start_server
- preserve existing behavior and interface
- switch signal handling to asyncio-native approach
- add KeyboardInterrupt fallback for unsupported platforms
- improve shutdown reliability via finally block
@arnobaer arnobaer added this to the 1.5.x milestone Mar 25, 2026
@arnobaer arnobaer self-assigned this Mar 25, 2026
@arnobaer arnobaer added the enhancement New feature or request label Mar 25, 2026
@arnobaer arnobaer merged commit b7e1b63 into main Mar 25, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant