Skip to content

Async http client#81

Merged
dkargin merged 34 commits intomasterfrom
async_http_client
Feb 8, 2026
Merged

Async http client#81
dkargin merged 34 commits intomasterfrom
async_http_client

Conversation

@dkargin
Copy link
Owner

@dkargin dkargin commented Nov 22, 2025

Implementing better HttpClient for rosmaster:

  1. Async operation
  2. Can track status of each request directly.
  3. Will be used for sending requests from rosmaster to other nodes or masters.
  4. Will replace more parts from xmlrpc.

@dkargin
Copy link
Owner Author

dkargin commented Feb 8, 2026

Additional thread at miniros::RPCManager was removed. Now all XMPRPC requests are spinned by PollSet instance from PollManager, or processed later by internal callback queue.

All usage of XmlRpc::XmlRpcClient in miniros::RPCManager and miniros::MasterLink was replaced by miniros::http::HttpClient. It has resolved some potential internal racing conditions and deadlocks and reduced usage of xmlrpc library overall.

Additional functionality to PollSet was added:

  1. Can set timeout event for socket. This event is not very precise (about 50ms resolution) but sufficient for reconnection logic.
  2. Sockets with zero event flags will be removed from epoll, but still be registered inside PollSet. It will reduce number of fired events for objects in some idle or semi-disconnected state.

@dkargin dkargin merged commit 4de4a90 into master Feb 8, 2026
5 checks passed
@dkargin dkargin deleted the async_http_client branch February 8, 2026 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant