Is there a way to concurrently, i.e. through std.Io.concurrent, read from and write to std.crypto.tls.Client’s writer and reader? No particular requirements, just that blocked reads don’t block writes and vice versa.
“solution” to my particular use case
// this might be the worst concurrency code i've ever written
var buf: [2]Result = undefined;
var first = std.Io.Select(Result).init(io, &buf);
defer while (first.cancel()) |x| switch (x) {
inline else => |m| gpa.free(m catch continue),
};
try first.concurrent(.received_message, std.Io.Queue([]u8).getOne, .{ client.outbound_packets, io });
try first.concurrent(.message_to_send, receiveMessage, .{ reader, io, gpa, client.outbound_packets });
const result = try first.await();