Skip to content

stream::write - should be implemented in terms of write(char*, int) #4

@steve-lorimer

Description

@steve-lorimer

Duplication of code in write:

bool write(const std::vector<char>& buf, ...) and bool write(const std::string& buf, ...) should just defer to bool write(const char* buf, int len, ...)

    bool write(const std::string& buf, std::function<void(error)> callback)
    {
        return write(buf.c_str(), buf.length(), callback);
    }

    bool write(const std::vector<char>& buf, std::function<void(error)> callback)
    {
        return write(&buf[0], buf.size(), callback);
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions