diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index f59f724..c8e8b4c 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.3","generation_timestamp":"2024-05-28T11:59:51","documenter_version":"1.4.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.3","generation_timestamp":"2024-05-28T16:14:50","documenter_version":"1.4.1"}} \ No newline at end of file diff --git a/dev/_changelog/index.html b/dev/_changelog/index.html new file mode 100644 index 0000000..f8e5530 --- /dev/null +++ b/dev/_changelog/index.html @@ -0,0 +1,2 @@ + +Changelog · ZMQ.jl

Changelog

This documents notable changes in ZMQ.jl. The format is based on Keep a Changelog.

[v1.2.5] - 2024-05-28

Fixed

  • Fixed support for Julia 1.3 in the precompilation workload ([#237]).

[v1.2.4] - 2024-05-27

Changed

  • Refactored the internals to use the public FileWatching.FDWatcher instead of FileWatching._FDWatcher ([#215]).

Fixed

  • Docstrings to inner constructors are now assigned properly ([#227]).
  • Socket now holds a reference to its Context to prevent it from being garbage collected accidentally ([#229]).
  • Changed the precompilation workload to use any available port to avoid port conflicts ([#234]).

[v1.2.3] - 2024-05-12

Added

  • Support for setting ZMQ_IMMEDIATE and ZMQ_CONFLATE on sockets ([#209], [#222]).
  • Overloads for Message to allow deserializing them with MsgPack.jl ([#214]).
  • A precompilation workload to improve TTFX ([#224]).
diff --git a/dev/changelog/index.html b/dev/changelog/index.html new file mode 100644 index 0000000..b63eeb7 --- /dev/null +++ b/dev/changelog/index.html @@ -0,0 +1,2 @@ + +Changelog · ZMQ.jl

Changelog

This documents notable changes in ZMQ.jl. The format is based on Keep a Changelog.

v1.2.5 - 2024-05-28

Fixed

  • Fixed support for Julia 1.3 in the precompilation workload (#237).

v1.2.4 - 2024-05-27

Changed

  • Refactored the internals to use the public FileWatching.FDWatcher instead of FileWatching._FDWatcher (#215).

Fixed

  • Docstrings to inner constructors are now assigned properly (#227).
  • Socket now holds a reference to its Context to prevent it from being garbage collected accidentally (#229).
  • Changed the precompilation workload to use any available port to avoid port conflicts (#234).

v1.2.3 - 2024-05-12

Added

  • Support for setting ZMQ_IMMEDIATE and ZMQ_CONFLATE on sockets (#209, #222).
  • Overloads for Message to allow deserializing them with MsgPack.jl (#214).
  • A precompilation workload to improve TTFX (#224).
diff --git a/dev/index.html b/dev/index.html index e539d06..6df2ba4 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,2 +1,2 @@ -Home · ZMQ.jl
+Home · ZMQ.jl
diff --git a/dev/man/examples/index.html b/dev/man/examples/index.html index abb8318..6a4d2e5 100644 --- a/dev/man/examples/index.html +++ b/dev/man/examples/index.html @@ -1,2 +1,2 @@ -Examples · ZMQ.jl
+Examples · ZMQ.jl
diff --git a/dev/man/guide/index.html b/dev/man/guide/index.html index caac3b7..e2b2099 100644 --- a/dev/man/guide/index.html +++ b/dev/man/guide/index.html @@ -1,5 +1,5 @@ -Guide · ZMQ.jl

Guide

Usage

using ZMQ
+Guide · ZMQ.jl

Guide

Usage

using ZMQ
 
 s1=Socket(REP)
 s2=Socket(REQ)
@@ -11,4 +11,4 @@
 msg = recv(s1, String)
 send(s1, "test response")
 close(s1)
-close(s2)

The send(socket, x) and recv(socket, SomeType) functions make an extra copy of the data when converting between ZMQ and Julia. Alternatively, for large data sets (e.g. very large arrays or long strings), it can be preferable to share data, with send(socket, Message(x)) and msg = recv(Message), where the msg::Message object acts like an array of bytes; this involves some overhead so it may not be optimal for short messages.

(Help in writing more detailed documentation would be welcome!)

+close(s2)

The send(socket, x) and recv(socket, SomeType) functions make an extra copy of the data when converting between ZMQ and Julia. Alternatively, for large data sets (e.g. very large arrays or long strings), it can be preferable to share data, with send(socket, Message(x)) and msg = recv(Message), where the msg::Message object acts like an array of bytes; this involves some overhead so it may not be optimal for short messages.

(Help in writing more detailed documentation would be welcome!)

diff --git a/dev/objects.inv b/dev/objects.inv index ea9d524..9890b56 100644 Binary files a/dev/objects.inv and b/dev/objects.inv differ diff --git a/dev/reference/index.html b/dev/reference/index.html index 1862dbe..4ea0ea8 100644 --- a/dev/reference/index.html +++ b/dev/reference/index.html @@ -1,2 +1,2 @@ -Reference · ZMQ.jl

Reference

Sockets

The ZMQ Socket type:

ZMQ.SocketMethod
Socket(ctx::Context, typ::Integer)

Create a socket in a given context.

source
ZMQ.SocketMethod
Socket(typ::Integer)

Create a socket of a certain type.

source

Socket implements the Sockets interface:

Base.bindFunction
Sockets.bind(socket::Socket, endpoint::AbstractString)

Bind the socket to an endpoint. Note that the endpoint must be formatted as described here. e.g. tcp://127.0.0.1:42000.

source
Sockets.connectFunction
Sockets.connect(socket::Socket, endpoint::AbstractString)

Connect the socket to an endpoint.

source
Sockets.recvFunction
recv(socket::Socket)

Return a Message object representing a message received from a ZMQ Socket (without making a copy of the message data).

source
recv(socket::Socket, ::Type{T})

Receive a message of type T (typically a String, Vector{UInt8}, or isbits type) from a ZMQ Socket. (Makes a copy of the message data; you can alternatively use recv(socket) to work with zero-copy bytearray-like representation for large messages.)

source
Sockets.sendFunction
send(socket::Socket, data; more=false)

Send data over socket. A more=true keyword argument can be passed to indicate that data is a portion of a larger multipart message. data can be any isbits type, a Vector of isbits elements, a String, or a Message object to perform zero-copy sends of large arrays.

source
send(socket::Socket, zmsg::Message; more::Bool=false)

Zero-copy version of Sockets.send(socket, data) using a user-allocated Message.

source

ZMQ socket types (note: some of these are aliases; e.g. XREQ = DEALER):

Messages

ZMQ.MessageType

High-level Message object for sending/receiving ZMQ messages in shared buffers.

source
ZMQ.MessageMethod
Message(len::Integer)

Create a message with a given buffer size (for send).

source
ZMQ.MessageMethod
Message(origin::Any, m::Ptr{T}, len::Integer) where {T}

Low-level function to create a message (for send) with an existing data buffer, without making a copy. The origin parameter should be the Julia object that is the origin of the data, so that we can hold a reference to it until ZMQ is done with the buffer.

source
ZMQ.MessageMethod
Message(m::String)

Create a message with a string as a buffer (for send). Note: the Message now "owns" the string, it must not be resized, or even written to after the message is sent.

source
ZMQ.MessageMethod
Message(p::SubString{String})

Create a message with a sub-string as a buffer (for send). Note: the same ownership semantics as for Message(m::String) apply.

source

Context

ZMQ.contextFunction
context()

Return the default ZMQ context (of type Context), initializing it if this has not been done already. (This context is automatically closed when Julia exits.)

source
+Reference · ZMQ.jl

Reference

Sockets

The ZMQ Socket type:

ZMQ.SocketMethod
Socket(ctx::Context, typ::Integer)

Create a socket in a given context.

source
ZMQ.SocketMethod
Socket(typ::Integer)

Create a socket of a certain type.

source

Socket implements the Sockets interface:

Base.bindFunction
Sockets.bind(socket::Socket, endpoint::AbstractString)

Bind the socket to an endpoint. Note that the endpoint must be formatted as described here. e.g. tcp://127.0.0.1:42000.

source
Sockets.connectFunction
Sockets.connect(socket::Socket, endpoint::AbstractString)

Connect the socket to an endpoint.

source
Sockets.recvFunction
recv(socket::Socket)

Return a Message object representing a message received from a ZMQ Socket (without making a copy of the message data).

source
recv(socket::Socket, ::Type{T})

Receive a message of type T (typically a String, Vector{UInt8}, or isbits type) from a ZMQ Socket. (Makes a copy of the message data; you can alternatively use recv(socket) to work with zero-copy bytearray-like representation for large messages.)

source
Sockets.sendFunction
send(socket::Socket, data; more=false)

Send data over socket. A more=true keyword argument can be passed to indicate that data is a portion of a larger multipart message. data can be any isbits type, a Vector of isbits elements, a String, or a Message object to perform zero-copy sends of large arrays.

source
send(socket::Socket, zmsg::Message; more::Bool=false)

Zero-copy version of Sockets.send(socket, data) using a user-allocated Message.

source

ZMQ socket types (note: some of these are aliases; e.g. XREQ = DEALER):

Messages

ZMQ.MessageType

High-level Message object for sending/receiving ZMQ messages in shared buffers.

source
ZMQ.MessageMethod
Message(len::Integer)

Create a message with a given buffer size (for send).

source
ZMQ.MessageMethod
Message(origin::Any, m::Ptr{T}, len::Integer) where {T}

Low-level function to create a message (for send) with an existing data buffer, without making a copy. The origin parameter should be the Julia object that is the origin of the data, so that we can hold a reference to it until ZMQ is done with the buffer.

source
ZMQ.MessageMethod
Message(m::String)

Create a message with a string as a buffer (for send). Note: the Message now "owns" the string, it must not be resized, or even written to after the message is sent.

source
ZMQ.MessageMethod
Message(p::SubString{String})

Create a message with a sub-string as a buffer (for send). Note: the same ownership semantics as for Message(m::String) apply.

source

Context

ZMQ.contextFunction
context()

Return the default ZMQ context (of type Context), initializing it if this has not been done already. (This context is automatically closed when Julia exits.)

source
diff --git a/dev/search_index.js b/dev/search_index.js index 9b53507..5d9a3cb 100644 --- a/dev/search_index.js +++ b/dev/search_index.js @@ -1,3 +1,3 @@ var documenterSearchIndex = {"docs": -[{"location":"man/guide/#Guide","page":"Guide","title":"Guide","text":"","category":"section"},{"location":"man/guide/#Usage","page":"Guide","title":"Usage","text":"","category":"section"},{"location":"man/guide/","page":"Guide","title":"Guide","text":"using ZMQ\n\ns1=Socket(REP)\ns2=Socket(REQ)\n\nbind(s1, \"tcp://*:5555\")\nconnect(s2, \"tcp://localhost:5555\")\n\nsend(s2, \"test request\")\nmsg = recv(s1, String)\nsend(s1, \"test response\")\nclose(s1)\nclose(s2)","category":"page"},{"location":"man/guide/","page":"Guide","title":"Guide","text":"The send(socket, x) and recv(socket, SomeType) functions make an extra copy of the data when converting between ZMQ and Julia. Alternatively, for large data sets (e.g. very large arrays or long strings), it can be preferable to share data, with send(socket, Message(x)) and msg = recv(Message), where the msg::Message object acts like an array of bytes; this involves some overhead so it may not be optimal for short messages.","category":"page"},{"location":"man/guide/","page":"Guide","title":"Guide","text":"(Help in writing more detailed documentation would be welcome!)","category":"page"},{"location":"reference/#Reference","page":"Reference","title":"Reference","text":"","category":"section"},{"location":"reference/#Sockets","page":"Reference","title":"Sockets","text":"","category":"section"},{"location":"reference/","page":"Reference","title":"Reference","text":"The ZMQ Socket type:","category":"page"},{"location":"reference/","page":"Reference","title":"Reference","text":"Socket\nSocket(::Context, ::Integer)\nSocket(::Integer)\nSocket(::Function)\nisopen\nclose","category":"page"},{"location":"reference/#ZMQ.Socket","page":"Reference","title":"ZMQ.Socket","text":"A ZMQ socket.\n\n\n\n\n\n","category":"type"},{"location":"reference/#ZMQ.Socket-Tuple{Context, Integer}","page":"Reference","title":"ZMQ.Socket","text":"Socket(ctx::Context, typ::Integer)\n\nCreate a socket in a given context.\n\n\n\n\n\n","category":"method"},{"location":"reference/#ZMQ.Socket-Tuple{Integer}","page":"Reference","title":"ZMQ.Socket","text":"Socket(typ::Integer)\n\nCreate a socket of a certain type.\n\n\n\n\n\n","category":"method"},{"location":"reference/#ZMQ.Socket-Tuple{Function}","page":"Reference","title":"ZMQ.Socket","text":"Socket(f::Function, args...)\n\nDo-block constructor.\n\n\n\n\n\n","category":"method"},{"location":"reference/#Base.isopen","page":"Reference","title":"Base.isopen","text":"Base.isopen(socket::Socket)\n\n\n\n\n\n","category":"function"},{"location":"reference/#Base.close","page":"Reference","title":"Base.close","text":"Base.close(socket::Socket)\n\n\n\n\n\n","category":"function"},{"location":"reference/","page":"Reference","title":"Reference","text":"Socket implements the Sockets interface:","category":"page"},{"location":"reference/","page":"Reference","title":"Reference","text":"bind\nconnect\nrecv\nsend","category":"page"},{"location":"reference/#Base.bind","page":"Reference","title":"Base.bind","text":"Sockets.bind(socket::Socket, endpoint::AbstractString)\n\nBind the socket to an endpoint. Note that the endpoint must be formatted as described here. e.g. tcp://127.0.0.1:42000.\n\n\n\n\n\n","category":"function"},{"location":"reference/#Sockets.connect","page":"Reference","title":"Sockets.connect","text":"Sockets.connect(socket::Socket, endpoint::AbstractString)\n\nConnect the socket to an endpoint.\n\n\n\n\n\n","category":"function"},{"location":"reference/#Sockets.recv","page":"Reference","title":"Sockets.recv","text":"recv(socket::Socket)\n\nReturn a Message object representing a message received from a ZMQ Socket (without making a copy of the message data).\n\n\n\n\n\nrecv(socket::Socket, ::Type{T})\n\nReceive a message of type T (typically a String, Vector{UInt8}, or isbits type) from a ZMQ Socket. (Makes a copy of the message data; you can alternatively use recv(socket) to work with zero-copy bytearray-like representation for large messages.)\n\n\n\n\n\n","category":"function"},{"location":"reference/#Sockets.send","page":"Reference","title":"Sockets.send","text":"send(socket::Socket, data; more=false)\n\nSend data over socket. A more=true keyword argument can be passed to indicate that data is a portion of a larger multipart message. data can be any isbits type, a Vector of isbits elements, a String, or a Message object to perform zero-copy sends of large arrays.\n\n\n\n\n\nsend(socket::Socket, zmsg::Message; more::Bool=false)\n\nZero-copy version of Sockets.send(socket, data) using a user-allocated Message.\n\n\n\n\n\n","category":"function"},{"location":"reference/","page":"Reference","title":"Reference","text":"ZMQ socket types (note: some of these are aliases; e.g. XREQ = DEALER):","category":"page"},{"location":"reference/","page":"Reference","title":"Reference","text":"PAIR\nPUB\nSUB\nREQ\nREP\nDEALER\nROUTER\nPULL\nPUSH\nXPUB\nXSUB\nXREQ\nXREP\nUPSTREAM\nDOWNSTREAM","category":"page"},{"location":"reference/#ZMQ.PAIR","page":"Reference","title":"ZMQ.PAIR","text":"PAIR socket.\n\n\n\n\n\n","category":"constant"},{"location":"reference/#ZMQ.PUB","page":"Reference","title":"ZMQ.PUB","text":"PUB socket.\n\n\n\n\n\n","category":"constant"},{"location":"reference/#ZMQ.SUB","page":"Reference","title":"ZMQ.SUB","text":"SUB socket.\n\n\n\n\n\n","category":"constant"},{"location":"reference/#ZMQ.REQ","page":"Reference","title":"ZMQ.REQ","text":"REQ socket.\n\n\n\n\n\n","category":"constant"},{"location":"reference/#ZMQ.REP","page":"Reference","title":"ZMQ.REP","text":"REP socket.\n\n\n\n\n\n","category":"constant"},{"location":"reference/#ZMQ.DEALER","page":"Reference","title":"ZMQ.DEALER","text":"DEALER socket.\n\n\n\n\n\n","category":"constant"},{"location":"reference/#ZMQ.ROUTER","page":"Reference","title":"ZMQ.ROUTER","text":"ROUTER socket.\n\n\n\n\n\n","category":"constant"},{"location":"reference/#ZMQ.PULL","page":"Reference","title":"ZMQ.PULL","text":"PULL socket.\n\n\n\n\n\n","category":"constant"},{"location":"reference/#ZMQ.PUSH","page":"Reference","title":"ZMQ.PUSH","text":"PUSH socket.\n\n\n\n\n\n","category":"constant"},{"location":"reference/#ZMQ.XPUB","page":"Reference","title":"ZMQ.XPUB","text":"XPUB socket.\n\n\n\n\n\n","category":"constant"},{"location":"reference/#ZMQ.XSUB","page":"Reference","title":"ZMQ.XSUB","text":"XSUB socket.\n\n\n\n\n\n","category":"constant"},{"location":"reference/#ZMQ.XREQ","page":"Reference","title":"ZMQ.XREQ","text":"XREQ socket.\n\ncompat: Compat\nThis is a deprecated alias for ZMQ.DEALER.\n\n\n\n\n\n","category":"constant"},{"location":"reference/#ZMQ.XREP","page":"Reference","title":"ZMQ.XREP","text":"XREP socket.\n\ncompat: Compat\nThis is a deprecated alias for ZMQ.ROUTER.\n\n\n\n\n\n","category":"constant"},{"location":"reference/#ZMQ.UPSTREAM","page":"Reference","title":"ZMQ.UPSTREAM","text":"UPSTREAM socket.\n\ncompat: Compat\nThis is a deprecated alias for ZMQ.PULL.\n\n\n\n\n\n","category":"constant"},{"location":"reference/#ZMQ.DOWNSTREAM","page":"Reference","title":"ZMQ.DOWNSTREAM","text":"DOWNSTREAM socket.\n\ncompat: Compat\nThis is a deprecated alias for ZMQ.PUSH.\n\n\n\n\n\n","category":"constant"},{"location":"reference/#Messages","page":"Reference","title":"Messages","text":"","category":"section"},{"location":"reference/","page":"Reference","title":"Reference","text":"Message\nMessage()\nMessage(::Integer)\nMessage(::Any)\nMessage(::String)\nMessage(::SubString{String})\nMessage(::Array)\nMessage(::IOBuffer)","category":"page"},{"location":"reference/#ZMQ.Message","page":"Reference","title":"ZMQ.Message","text":"High-level Message object for sending/receiving ZMQ messages in shared buffers.\n\n\n\n\n\n","category":"type"},{"location":"reference/#ZMQ.Message-Tuple{}","page":"Reference","title":"ZMQ.Message","text":"Message()\n\nCreate an empty message (for receive).\n\n\n\n\n\n","category":"method"},{"location":"reference/#ZMQ.Message-Tuple{Integer}","page":"Reference","title":"ZMQ.Message","text":"Message(len::Integer)\n\nCreate a message with a given buffer size (for send).\n\n\n\n\n\n","category":"method"},{"location":"reference/#ZMQ.Message-Tuple{Any}","page":"Reference","title":"ZMQ.Message","text":"Message(origin::Any, m::Ptr{T}, len::Integer) where {T}\n\nLow-level function to create a message (for send) with an existing data buffer, without making a copy. The origin parameter should be the Julia object that is the origin of the data, so that we can hold a reference to it until ZMQ is done with the buffer.\n\n\n\n\n\n","category":"method"},{"location":"reference/#ZMQ.Message-Tuple{String}","page":"Reference","title":"ZMQ.Message","text":"Message(m::String)\n\nCreate a message with a string as a buffer (for send). Note: the Message now \"owns\" the string, it must not be resized, or even written to after the message is sent.\n\n\n\n\n\n","category":"method"},{"location":"reference/#ZMQ.Message-Tuple{SubString{String}}","page":"Reference","title":"ZMQ.Message","text":"Message(p::SubString{String})\n\nCreate a message with a sub-string as a buffer (for send). Note: the same ownership semantics as for Message(m::String) apply.\n\n\n\n\n\n","category":"method"},{"location":"reference/#ZMQ.Message-Tuple{Array}","page":"Reference","title":"ZMQ.Message","text":"Message(a::Array)\n\nCreate a message with an array as a buffer (for send). Note: the same ownership semantics as for Message(m::String) apply.\n\n\n\n\n\n","category":"method"},{"location":"reference/#ZMQ.Message-Tuple{IOBuffer}","page":"Reference","title":"ZMQ.Message","text":"Message(io::IOBuffer)\n\nCreate a message with an IOBuffer as a buffer (for send). Note: the same ownership semantics as for Message(m::String) apply.\n\n\n\n\n\n","category":"method"},{"location":"reference/#Context","page":"Reference","title":"Context","text":"","category":"section"},{"location":"reference/","page":"Reference","title":"Reference","text":"ZMQ.context","category":"page"},{"location":"reference/#ZMQ.context","page":"Reference","title":"ZMQ.context","text":"context()\n\nReturn the default ZMQ context (of type Context), initializing it if this has not been done already. (This context is automatically closed when Julia exits.)\n\n\n\n\n\n","category":"function"},{"location":"man/examples/#Examples","page":"Examples","title":"Examples","text":"","category":"section"},{"location":"man/examples/","page":"Examples","title":"Examples","text":"Examples using ZMQ.jl can be found in the ZeroMQ Guide (zguide) or directly in its repository","category":"page"},{"location":"#ZMQ.jl","page":"Home","title":"ZMQ.jl","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"A Julia interface to ZeroMQ.","category":"page"},{"location":"","page":"Home","title":"Home","text":"ZMQ.jl is a Julia interface to ZeroMQ, The Intelligent Transport Layer.","category":"page"},{"location":"#Package-Features","page":"Home","title":"Package Features","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Access ZeroMQ sockets from Julia","category":"page"},{"location":"","page":"Home","title":"Home","text":"The Guide provides a tutorial explaining how to get started using ZMQ.jl.","category":"page"},{"location":"","page":"Home","title":"Home","text":"Some examples of packages using Documenter can be found on the Examples page.","category":"page"},{"location":"","page":"Home","title":"Home","text":"See the Reference for the complete list of documented functions and types.","category":"page"}] +[{"location":"_changelog/","page":"Changelog","title":"Changelog","text":"CurrentModule = ZMQ","category":"page"},{"location":"_changelog/#Changelog","page":"Changelog","title":"Changelog","text":"","category":"section"},{"location":"_changelog/","page":"Changelog","title":"Changelog","text":"This documents notable changes in ZMQ.jl. The format is based on Keep a Changelog.","category":"page"},{"location":"_changelog/#[v1.2.5]-2024-05-28","page":"Changelog","title":"[v1.2.5] - 2024-05-28","text":"","category":"section"},{"location":"_changelog/#Fixed","page":"Changelog","title":"Fixed","text":"","category":"section"},{"location":"_changelog/","page":"Changelog","title":"Changelog","text":"Fixed support for Julia 1.3 in the precompilation workload ([#237]).","category":"page"},{"location":"_changelog/#[v1.2.4]-2024-05-27","page":"Changelog","title":"[v1.2.4] - 2024-05-27","text":"","category":"section"},{"location":"_changelog/#Changed","page":"Changelog","title":"Changed","text":"","category":"section"},{"location":"_changelog/","page":"Changelog","title":"Changelog","text":"Refactored the internals to use the public FileWatching.FDWatcher instead of FileWatching._FDWatcher ([#215]).","category":"page"},{"location":"_changelog/#Fixed-2","page":"Changelog","title":"Fixed","text":"","category":"section"},{"location":"_changelog/","page":"Changelog","title":"Changelog","text":"Docstrings to inner constructors are now assigned properly ([#227]).\nSocket now holds a reference to its Context to prevent it from being garbage collected accidentally ([#229]).\nChanged the precompilation workload to use any available port to avoid port conflicts ([#234]).","category":"page"},{"location":"_changelog/#[v1.2.3]-2024-05-12","page":"Changelog","title":"[v1.2.3] - 2024-05-12","text":"","category":"section"},{"location":"_changelog/#Added","page":"Changelog","title":"Added","text":"","category":"section"},{"location":"_changelog/","page":"Changelog","title":"Changelog","text":"Support for setting ZMQ_IMMEDIATE and ZMQ_CONFLATE on sockets ([#209], [#222]).\nOverloads for Message to allow deserializing them with MsgPack.jl ([#214]).\nA precompilation workload to improve TTFX ([#224]).","category":"page"},{"location":"changelog/","page":"Changelog","title":"Changelog","text":"EditURL = \"https://github.com/JuliaInterop/ZMQ.jl/blob/master/CHANGELOG.md\"","category":"page"},{"location":"changelog/","page":"Changelog","title":"Changelog","text":"CurrentModule = ZMQ","category":"page"},{"location":"changelog/#Changelog","page":"Changelog","title":"Changelog","text":"","category":"section"},{"location":"changelog/","page":"Changelog","title":"Changelog","text":"This documents notable changes in ZMQ.jl. The format is based on Keep a Changelog.","category":"page"},{"location":"changelog/#[v1.2.5](https://github.com/JuliaInterop/ZMQ.jl/releases/tag/v1.2.5)-2024-05-28","page":"Changelog","title":"v1.2.5 - 2024-05-28","text":"","category":"section"},{"location":"changelog/#Fixed","page":"Changelog","title":"Fixed","text":"","category":"section"},{"location":"changelog/","page":"Changelog","title":"Changelog","text":"Fixed support for Julia 1.3 in the precompilation workload (#237).","category":"page"},{"location":"changelog/#[v1.2.4](https://github.com/JuliaInterop/ZMQ.jl/releases/tag/v1.2.4)-2024-05-27","page":"Changelog","title":"v1.2.4 - 2024-05-27","text":"","category":"section"},{"location":"changelog/#Changed","page":"Changelog","title":"Changed","text":"","category":"section"},{"location":"changelog/","page":"Changelog","title":"Changelog","text":"Refactored the internals to use the public FileWatching.FDWatcher instead of FileWatching._FDWatcher (#215).","category":"page"},{"location":"changelog/#Fixed-2","page":"Changelog","title":"Fixed","text":"","category":"section"},{"location":"changelog/","page":"Changelog","title":"Changelog","text":"Docstrings to inner constructors are now assigned properly (#227).\nSocket now holds a reference to its Context to prevent it from being garbage collected accidentally (#229).\nChanged the precompilation workload to use any available port to avoid port conflicts (#234).","category":"page"},{"location":"changelog/#[v1.2.3](https://github.com/JuliaInterop/ZMQ.jl/releases/tag/v1.2.3)-2024-05-12","page":"Changelog","title":"v1.2.3 - 2024-05-12","text":"","category":"section"},{"location":"changelog/#Added","page":"Changelog","title":"Added","text":"","category":"section"},{"location":"changelog/","page":"Changelog","title":"Changelog","text":"Support for setting ZMQ_IMMEDIATE and ZMQ_CONFLATE on sockets (#209, #222).\nOverloads for Message to allow deserializing them with MsgPack.jl (#214).\nA precompilation workload to improve TTFX (#224).","category":"page"},{"location":"man/guide/#Guide","page":"Guide","title":"Guide","text":"","category":"section"},{"location":"man/guide/#Usage","page":"Guide","title":"Usage","text":"","category":"section"},{"location":"man/guide/","page":"Guide","title":"Guide","text":"using ZMQ\n\ns1=Socket(REP)\ns2=Socket(REQ)\n\nbind(s1, \"tcp://*:5555\")\nconnect(s2, \"tcp://localhost:5555\")\n\nsend(s2, \"test request\")\nmsg = recv(s1, String)\nsend(s1, \"test response\")\nclose(s1)\nclose(s2)","category":"page"},{"location":"man/guide/","page":"Guide","title":"Guide","text":"The send(socket, x) and recv(socket, SomeType) functions make an extra copy of the data when converting between ZMQ and Julia. Alternatively, for large data sets (e.g. very large arrays or long strings), it can be preferable to share data, with send(socket, Message(x)) and msg = recv(Message), where the msg::Message object acts like an array of bytes; this involves some overhead so it may not be optimal for short messages.","category":"page"},{"location":"man/guide/","page":"Guide","title":"Guide","text":"(Help in writing more detailed documentation would be welcome!)","category":"page"},{"location":"reference/#Reference","page":"Reference","title":"Reference","text":"","category":"section"},{"location":"reference/#Sockets","page":"Reference","title":"Sockets","text":"","category":"section"},{"location":"reference/","page":"Reference","title":"Reference","text":"The ZMQ Socket type:","category":"page"},{"location":"reference/","page":"Reference","title":"Reference","text":"Socket\nSocket(::Context, ::Integer)\nSocket(::Integer)\nSocket(::Function)\nisopen\nclose","category":"page"},{"location":"reference/#ZMQ.Socket","page":"Reference","title":"ZMQ.Socket","text":"A ZMQ socket.\n\n\n\n\n\n","category":"type"},{"location":"reference/#ZMQ.Socket-Tuple{Context, Integer}","page":"Reference","title":"ZMQ.Socket","text":"Socket(ctx::Context, typ::Integer)\n\nCreate a socket in a given context.\n\n\n\n\n\n","category":"method"},{"location":"reference/#ZMQ.Socket-Tuple{Integer}","page":"Reference","title":"ZMQ.Socket","text":"Socket(typ::Integer)\n\nCreate a socket of a certain type.\n\n\n\n\n\n","category":"method"},{"location":"reference/#ZMQ.Socket-Tuple{Function}","page":"Reference","title":"ZMQ.Socket","text":"Socket(f::Function, args...)\n\nDo-block constructor.\n\n\n\n\n\n","category":"method"},{"location":"reference/#Base.isopen","page":"Reference","title":"Base.isopen","text":"Base.isopen(socket::Socket)\n\n\n\n\n\n","category":"function"},{"location":"reference/#Base.close","page":"Reference","title":"Base.close","text":"Base.close(socket::Socket)\n\n\n\n\n\n","category":"function"},{"location":"reference/","page":"Reference","title":"Reference","text":"Socket implements the Sockets interface:","category":"page"},{"location":"reference/","page":"Reference","title":"Reference","text":"bind\nconnect\nrecv\nsend","category":"page"},{"location":"reference/#Base.bind","page":"Reference","title":"Base.bind","text":"Sockets.bind(socket::Socket, endpoint::AbstractString)\n\nBind the socket to an endpoint. Note that the endpoint must be formatted as described here. e.g. tcp://127.0.0.1:42000.\n\n\n\n\n\n","category":"function"},{"location":"reference/#Sockets.connect","page":"Reference","title":"Sockets.connect","text":"Sockets.connect(socket::Socket, endpoint::AbstractString)\n\nConnect the socket to an endpoint.\n\n\n\n\n\n","category":"function"},{"location":"reference/#Sockets.recv","page":"Reference","title":"Sockets.recv","text":"recv(socket::Socket)\n\nReturn a Message object representing a message received from a ZMQ Socket (without making a copy of the message data).\n\n\n\n\n\nrecv(socket::Socket, ::Type{T})\n\nReceive a message of type T (typically a String, Vector{UInt8}, or isbits type) from a ZMQ Socket. (Makes a copy of the message data; you can alternatively use recv(socket) to work with zero-copy bytearray-like representation for large messages.)\n\n\n\n\n\n","category":"function"},{"location":"reference/#Sockets.send","page":"Reference","title":"Sockets.send","text":"send(socket::Socket, data; more=false)\n\nSend data over socket. A more=true keyword argument can be passed to indicate that data is a portion of a larger multipart message. data can be any isbits type, a Vector of isbits elements, a String, or a Message object to perform zero-copy sends of large arrays.\n\n\n\n\n\nsend(socket::Socket, zmsg::Message; more::Bool=false)\n\nZero-copy version of Sockets.send(socket, data) using a user-allocated Message.\n\n\n\n\n\n","category":"function"},{"location":"reference/","page":"Reference","title":"Reference","text":"ZMQ socket types (note: some of these are aliases; e.g. XREQ = DEALER):","category":"page"},{"location":"reference/","page":"Reference","title":"Reference","text":"PAIR\nPUB\nSUB\nREQ\nREP\nDEALER\nROUTER\nPULL\nPUSH\nXPUB\nXSUB\nXREQ\nXREP\nUPSTREAM\nDOWNSTREAM","category":"page"},{"location":"reference/#ZMQ.PAIR","page":"Reference","title":"ZMQ.PAIR","text":"PAIR socket.\n\n\n\n\n\n","category":"constant"},{"location":"reference/#ZMQ.PUB","page":"Reference","title":"ZMQ.PUB","text":"PUB socket.\n\n\n\n\n\n","category":"constant"},{"location":"reference/#ZMQ.SUB","page":"Reference","title":"ZMQ.SUB","text":"SUB socket.\n\n\n\n\n\n","category":"constant"},{"location":"reference/#ZMQ.REQ","page":"Reference","title":"ZMQ.REQ","text":"REQ socket.\n\n\n\n\n\n","category":"constant"},{"location":"reference/#ZMQ.REP","page":"Reference","title":"ZMQ.REP","text":"REP socket.\n\n\n\n\n\n","category":"constant"},{"location":"reference/#ZMQ.DEALER","page":"Reference","title":"ZMQ.DEALER","text":"DEALER socket.\n\n\n\n\n\n","category":"constant"},{"location":"reference/#ZMQ.ROUTER","page":"Reference","title":"ZMQ.ROUTER","text":"ROUTER socket.\n\n\n\n\n\n","category":"constant"},{"location":"reference/#ZMQ.PULL","page":"Reference","title":"ZMQ.PULL","text":"PULL socket.\n\n\n\n\n\n","category":"constant"},{"location":"reference/#ZMQ.PUSH","page":"Reference","title":"ZMQ.PUSH","text":"PUSH socket.\n\n\n\n\n\n","category":"constant"},{"location":"reference/#ZMQ.XPUB","page":"Reference","title":"ZMQ.XPUB","text":"XPUB socket.\n\n\n\n\n\n","category":"constant"},{"location":"reference/#ZMQ.XSUB","page":"Reference","title":"ZMQ.XSUB","text":"XSUB socket.\n\n\n\n\n\n","category":"constant"},{"location":"reference/#ZMQ.XREQ","page":"Reference","title":"ZMQ.XREQ","text":"XREQ socket.\n\ncompat: Compat\nThis is a deprecated alias for ZMQ.DEALER.\n\n\n\n\n\n","category":"constant"},{"location":"reference/#ZMQ.XREP","page":"Reference","title":"ZMQ.XREP","text":"XREP socket.\n\ncompat: Compat\nThis is a deprecated alias for ZMQ.ROUTER.\n\n\n\n\n\n","category":"constant"},{"location":"reference/#ZMQ.UPSTREAM","page":"Reference","title":"ZMQ.UPSTREAM","text":"UPSTREAM socket.\n\ncompat: Compat\nThis is a deprecated alias for ZMQ.PULL.\n\n\n\n\n\n","category":"constant"},{"location":"reference/#ZMQ.DOWNSTREAM","page":"Reference","title":"ZMQ.DOWNSTREAM","text":"DOWNSTREAM socket.\n\ncompat: Compat\nThis is a deprecated alias for ZMQ.PUSH.\n\n\n\n\n\n","category":"constant"},{"location":"reference/#Messages","page":"Reference","title":"Messages","text":"","category":"section"},{"location":"reference/","page":"Reference","title":"Reference","text":"Message\nMessage()\nMessage(::Integer)\nMessage(::Any)\nMessage(::String)\nMessage(::SubString{String})\nMessage(::Array)\nMessage(::IOBuffer)","category":"page"},{"location":"reference/#ZMQ.Message","page":"Reference","title":"ZMQ.Message","text":"High-level Message object for sending/receiving ZMQ messages in shared buffers.\n\n\n\n\n\n","category":"type"},{"location":"reference/#ZMQ.Message-Tuple{}","page":"Reference","title":"ZMQ.Message","text":"Message()\n\nCreate an empty message (for receive).\n\n\n\n\n\n","category":"method"},{"location":"reference/#ZMQ.Message-Tuple{Integer}","page":"Reference","title":"ZMQ.Message","text":"Message(len::Integer)\n\nCreate a message with a given buffer size (for send).\n\n\n\n\n\n","category":"method"},{"location":"reference/#ZMQ.Message-Tuple{Any}","page":"Reference","title":"ZMQ.Message","text":"Message(origin::Any, m::Ptr{T}, len::Integer) where {T}\n\nLow-level function to create a message (for send) with an existing data buffer, without making a copy. The origin parameter should be the Julia object that is the origin of the data, so that we can hold a reference to it until ZMQ is done with the buffer.\n\n\n\n\n\n","category":"method"},{"location":"reference/#ZMQ.Message-Tuple{String}","page":"Reference","title":"ZMQ.Message","text":"Message(m::String)\n\nCreate a message with a string as a buffer (for send). Note: the Message now \"owns\" the string, it must not be resized, or even written to after the message is sent.\n\n\n\n\n\n","category":"method"},{"location":"reference/#ZMQ.Message-Tuple{SubString{String}}","page":"Reference","title":"ZMQ.Message","text":"Message(p::SubString{String})\n\nCreate a message with a sub-string as a buffer (for send). Note: the same ownership semantics as for Message(m::String) apply.\n\n\n\n\n\n","category":"method"},{"location":"reference/#ZMQ.Message-Tuple{Array}","page":"Reference","title":"ZMQ.Message","text":"Message(a::Array)\n\nCreate a message with an array as a buffer (for send). Note: the same ownership semantics as for Message(m::String) apply.\n\n\n\n\n\n","category":"method"},{"location":"reference/#ZMQ.Message-Tuple{IOBuffer}","page":"Reference","title":"ZMQ.Message","text":"Message(io::IOBuffer)\n\nCreate a message with an IOBuffer as a buffer (for send). Note: the same ownership semantics as for Message(m::String) apply.\n\n\n\n\n\n","category":"method"},{"location":"reference/#Context","page":"Reference","title":"Context","text":"","category":"section"},{"location":"reference/","page":"Reference","title":"Reference","text":"ZMQ.context","category":"page"},{"location":"reference/#ZMQ.context","page":"Reference","title":"ZMQ.context","text":"context()\n\nReturn the default ZMQ context (of type Context), initializing it if this has not been done already. (This context is automatically closed when Julia exits.)\n\n\n\n\n\n","category":"function"},{"location":"man/examples/#Examples","page":"Examples","title":"Examples","text":"","category":"section"},{"location":"man/examples/","page":"Examples","title":"Examples","text":"Examples using ZMQ.jl can be found in the ZeroMQ Guide (zguide) or directly in its repository","category":"page"},{"location":"#ZMQ.jl","page":"Home","title":"ZMQ.jl","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"A Julia interface to ZeroMQ.","category":"page"},{"location":"","page":"Home","title":"Home","text":"ZMQ.jl is a Julia interface to ZeroMQ, The Intelligent Transport Layer.","category":"page"},{"location":"#Package-Features","page":"Home","title":"Package Features","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Access ZeroMQ sockets from Julia","category":"page"},{"location":"","page":"Home","title":"Home","text":"The Guide provides a tutorial explaining how to get started using ZMQ.jl.","category":"page"},{"location":"","page":"Home","title":"Home","text":"Some examples of packages using Documenter can be found on the Examples page.","category":"page"},{"location":"","page":"Home","title":"Home","text":"See the Reference for the complete list of documented functions and types.","category":"page"}] }