posix_mq

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	O_RDONLY = C.O_RDONLY
	O_WRONLY = C.O_WRONLY
	O_RDWR   = C.O_RDWR

	O_CLOEXEC  = C.O_CLOEXEC
	O_CREAT    = C.O_CREAT
	O_EXCL     = C.O_EXCL
	O_NONBLOCK = C.O_NONBLOCK

	// Based on Linux 3.5+
	MSGSIZE_MAX     = 16777216
	MSGSIZE_DEFAULT = MSGSIZE_MAX
)

Variables

View Source
var (
	MemoryAllocationError = fmt.Errorf("Memory Allocation Error")
)

Functions

This section is empty.

Types

type MessageQueue

type MessageQueue struct {
	// contains filtered or unexported fields
}

Represents the message queue

func NewMessageQueue

func NewMessageQueue(name string, oflag int, mode int, attr *MessageQueueAttribute) (*MessageQueue, error)

NewMessageQueue returns an instance of the message queue given a QueueConfig.

func (*MessageQueue) Close

func (mq *MessageQueue) Close() error

Close closes the message queue.

func (*MessageQueue) Notify

func (mq *MessageQueue) Notify(sigNo syscall.Signal) error

FIXME Don't work because of signal portability. Notify set signal notification to handle new messages.

func (*MessageQueue) Receive

func (mq *MessageQueue) Receive() ([]byte, uint, error)

Receive receives message from the message queue.

func (*MessageQueue) Send

func (mq *MessageQueue) Send(data []byte, priority uint) error

Send sends message to the message queue.

func (mq *MessageQueue) Unlink() error

Unlink deletes the message queue.

type MessageQueueAttribute

type MessageQueueAttribute struct {
	// contains filtered or unexported fields
}

Represents the message queue attribute

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL