Skip to content

Need to check if all data sent #305

Closed
@nskforward

Description

@nskforward

In write.go file function Write does not return the number of actually sent bytes.
So currently I cannot do the second assertion in code below:

n, err := conn.Write(ctx, websocket.MessageBinary, data)
if err != nil {
...
}
if len(data) != n {
// send remaining bytes in the next Write call or throw an error
}

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