#mq #ipc #message-queue #sysv

sysvmq

A simple API for SysV IPC message queues

2 releases

0.1.1 Dec 8, 2023
0.1.0 Dec 8, 2023

#563 in Operating systems

GPL-3.0-or-later

12KB
121 lines

status-badge

Sysvmq

This library provides a convenient and easy usable API for SysV IPC message queues.

use sysvmq::{SysvMq, SysvMqError};

fn example() -> Result<(), SysvMqError> {
    let mut mq = SysvMq::new(0)?;
    let mut buf = [0u8; 11];

    mq.send(b"hello queue")?;
    mq.recv(&mut buf)?;
    mq.delete()?;

    Ok(())
}

lib.rs:

This library provides a convenient API to SysV IPC message queues.

Example

use sysvmq::{SysvMq, SysvMqError};

fn example() -> Result<(), SysvMqError> {
    let mut mq = SysvMq::new(0)?;
    let mut buf = [0u8; 11];

    mq.send(b"hello queue")?;
    mq.recv(&mut buf)?;
    mq.delete()?;

    Ok(())
}

Dependencies

~2.5MB
~52K SLoC