Function readvDirect [src]
Prototype
pub fn readvDirect(conn: *Connection, buffers: []std.posix.iovec) ReadError!usize
Parameters
conn: *Connection
buffers: []std.posix.iovec
Possible Errors
Source
pub fn readvDirect(conn: *Connection, buffers: []std.posix.iovec) ReadError!usize {
if (conn.protocol == .tls) {
if (disable_tls) unreachable;
return conn.readvDirectTls(buffers);
}
return conn.stream.readv(buffers) catch |err| switch (err) {
error.ConnectionTimedOut => return error.ConnectionTimedOut,
error.ConnectionResetByPeer, error.BrokenPipe => return error.ConnectionResetByPeer,
else => return error.UnexpectedReadFailure,
};
}