Jnanomsg Api Documentation

Version: 0.4.3

nanomsg.core

Nanomsg is a socket library that provides several common communication patterns. It aims to make the networking layer fast, scalable, and easy to use.

It is implemented in C, it works on a wide range of operating systems with no further dependencies.

This is a clojure idiomatic wrapper for native C nanomsg library.

If you want send your more complex data types, create a new pair of send/recv functions that serializes and deserializers data before send and after receive.

bind!

(bind! socket endpoint)

Bind given socket to specified endpoint.

close!

(close! socket)

Close socket.

connect!

(connect! socket endpoint)

Connect given socket to specified endpoint.

recv!

(recv! socket)(recv! socket opt)

Receive data through given socket.

recv-str!

(recv-str! socket)(recv-str! socket opt)

Receive data through given socket.

send!

(send! socket data)(send! socket data opt)

Send data through given socket.

socket

(socket socktype)(socket socktype opts)

Geiven a socket type, create a new instance of corresponding socket.

start-device

(start-device s1 s2)

Given two sockets, start a device.

subscribe!

(subscribe! socket topic)

Subscribe given socket to specified topic.

symbols

Get all symbols

terminate!

(terminate!)

Send terminate signal to all open and/or blocked sockets. This is usefull for multithreaded apps.

unsubscribe!

(unsubscribe! socket topic)

Unsubscribe given socket from specified topic.