Sha256: b8135d71bf8e48d4435684ddb22f9ae9351af94da2168927e6f762452b794139

Contents?: true

Size: 592 Bytes

Versions: 1

Compression:

Stored size: 592 Bytes

Contents

# sysvmq

`sysvmq` is a C extension that wraps SysV IPC Message Queues. Only compatible
with MRI 2.0 and 2.1 currently.

```ruby
# Create a message queue with a 1024 byte buffer.
require 'sysvmq'
mq = SysVMQ.new(0xDEADC0DE, 1024, SysVMQ::IPC_CREAT | 0666)

mq.send "Hellø Wårld!"
assert_equal 1, mq.stats[:count]

assert_equal "Hellø Wårld!", mq.receive

# Raise an exception instead of blocking until a message is available
mq.receive(0, SysVMQ::IPC_NOWAIT)

ensure
# Delete queue
mq.destroy
```

## Installation

  gem 'sysv-mq', github: "Sirupsen/sysvmq" # until published to rubygems

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sysvmq-0.0.1 README.md