Skip to content

Get rid of double indirection #536

@marton78

Description

@marton78

Hi, first of all thanks for this great library.

One hint: you could get rid of the double indirection in

using OnMessageCallback = std::function<void(const WebSocketMessagePtr&)>;

by changing it to

using OnMessageCallback = std::function<void(const WebSocketMessage&)>;

This could also be done in a backwards-compatible fashion by offering a second overload, e.g.:

using OnMessageCallbackNew = std::function<void(const WebSocketMessage&)>;
void setOnMessageCallback(const OnMessageCallbackNew& callback);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions