Skip to content

Use &mut [IoSlice] for request sending #427

Open
@psychon

Description

@psychon

XCBConnection creates a copy of the passed in slice of request buffers. So far, RustConnection does not, but instead switches between write_vectored and plain write for a buffer:

let remaining = &bufs[0][count..];
write.write_all(remaining, fds)?;

I think it should be possible to get rid of that write part by using a mutable slice for request sending. That way, partial writes can be done by replacing the respective IoSlice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Priority Middlehelp wantedExtra attention is neededstable APIThings that might require API changes

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions