mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 07:03:29 +00:00
msg: comments typos
Signed-off-by: Francis Bouvier <francis@lightpanda.io>
This commit is contained in:
@@ -20,12 +20,12 @@ const std = @import("std");
|
|||||||
|
|
||||||
// pub const MaxStdOutSize = 512; // ensure debug msg are not too long
|
// pub const MaxStdOutSize = 512; // ensure debug msg are not too long
|
||||||
|
|
||||||
/// MsgBuffer return messages from a raw text read stream,
|
/// MsgBuffer returns messages from a raw text read stream,
|
||||||
/// according to the following format `<msg_size>:<msg>`.
|
/// according to the following format `<msg_size>:<msg>`.
|
||||||
/// It handles both:
|
/// It handles both:
|
||||||
/// - combined messages in one read
|
/// - combined messages in one read
|
||||||
/// - single message in several read (multipart)
|
/// - single message in several reads (multipart)
|
||||||
/// It is safe (and good practice) to reuse the same MsgBuffer
|
/// It's safe (and a good practice) to reuse the same MsgBuffer
|
||||||
/// on several reads of the same stream.
|
/// on several reads of the same stream.
|
||||||
pub const MsgBuffer = struct {
|
pub const MsgBuffer = struct {
|
||||||
size: usize = 0,
|
size: usize = 0,
|
||||||
@@ -56,8 +56,7 @@ pub const MsgBuffer = struct {
|
|||||||
|
|
||||||
// read input
|
// read input
|
||||||
// - `do_func` is a callback to execute on each message of the input
|
// - `do_func` is a callback to execute on each message of the input
|
||||||
// - `data` is a arbitrary payload that will be passed to the callback along with
|
// - `data` is an arbitrary user data that will be forwarded to the do_func callback
|
||||||
// the message itself
|
|
||||||
pub fn read(
|
pub fn read(
|
||||||
self: *MsgBuffer,
|
self: *MsgBuffer,
|
||||||
alloc: std.mem.Allocator,
|
alloc: std.mem.Allocator,
|
||||||
|
|||||||
Reference in New Issue
Block a user