Skip to content

Provide an API for using a custom asio::io_service #390

@mscofield0

Description

@mscofield0

Summary

Currently for every asio client, a new io_context is started. This subsequently means that a new thread pool is started, which shouldn't be enforced in this library. It would be nice to provide an API to supply a custom client options struct that would hold a custom asio::io_service* (defaulted to nullptr).

Proposal

Change the API of sio::client::client() to sio::client::client(sio::client_options const&) and add:

struct client_options {
  asio::io_service* io_service;
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions