diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 7c71cbd..9250add 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-11-30T20:21:44","documenter_version":"1.8.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-12-01T11:13:32","documenter_version":"1.8.0"}} \ No newline at end of file diff --git a/dev/_changelog/index.html b/dev/_changelog/index.html index 12fb720..89f3f51 100644 --- a/dev/_changelog/index.html +++ b/dev/_changelog/index.html @@ -1,2 +1,2 @@ -Changelog · ZMQ.jl

Changelog

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

[v1.4.0] - 2024-11-30

Added

[v1.3.0] - 2024-08-03

Added

  • Support for creating Message's from the new Memory type in Julia 1.11 ([#244]).
  • Full Bindings to libzmq ([#232]).

Deprecated

  • The Base.convert(IOStream, ::Message) method has been deprecated due to buggy behaviour, use IOBuffer(msg) instead ([#247]).

Fixed

  • Fixed isfreed(), which would previously return the wrong values ([#245]).

[v1.2.6] - 2024-06-13

Added

Fixed

  • Fixed a precompilation bug that would cause creating a sysimage with PackageCompiler.jl on Julia 1.6 to fail ([#242]).

[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]).
+Changelog · ZMQ.jl

Changelog

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

[v1.4.0] - 2024-11-30

Added

[v1.3.0] - 2024-08-03

Added

  • Support for creating Message's from the new Memory type in Julia 1.11 ([#244]).
  • Full Bindings to libzmq ([#232]).

Deprecated

  • The Base.convert(IOStream, ::Message) method has been deprecated due to buggy behaviour, use IOBuffer(msg) instead ([#247]).

Fixed

  • Fixed isfreed(), which would previously return the wrong values ([#245]).

[v1.2.6] - 2024-06-13

Added

Fixed

  • Fixed a precompilation bug that would cause creating a sysimage with PackageCompiler.jl on Julia 1.6 to fail ([#242]).

[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/bindings/index.html b/dev/bindings/index.html index ae8c64a..9171a8d 100644 --- a/dev/bindings/index.html +++ b/dev/bindings/index.html @@ -1,2 +1,2 @@ -Bindings · ZMQ.jl

Bindings

This page documents the low-level bindings to libzmq that were automatically generated. Where possible, the docstrings link to the upstream documentation. Bindings have not been generated for deprecated functions.

Danger

These bindings are unsafe, do not use them unless you know what you're doing.


ZMQ.lib.zmq_sleepMethod
zmq_sleep(seconds_)

This is an undocumented function, not part of the formal ZMQ API.

source
+Bindings · ZMQ.jl

Bindings

This page documents the low-level bindings to libzmq that were automatically generated. Where possible, the docstrings link to the upstream documentation. Bindings have not been generated for deprecated functions.

Danger

These bindings are unsafe, do not use them unless you know what you're doing.


ZMQ.lib.zmq_sleepMethod
zmq_sleep(seconds_)

This is an undocumented function, not part of the formal ZMQ API.

source
diff --git a/dev/changelog/index.html b/dev/changelog/index.html index b287321..3910a90 100644 --- a/dev/changelog/index.html +++ b/dev/changelog/index.html @@ -1,2 +1,2 @@ -Changelog · ZMQ.jl

Changelog

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

v1.4.0 - 2024-11-30

Added

v1.3.0 - 2024-08-03

Added

Deprecated

  • The Base.convert(IOStream, ::Message) method has been deprecated due to buggy behaviour, use IOBuffer(msg) instead (#247).

Fixed

  • Fixed isfreed(), which would previously return the wrong values (#245).

v1.2.6 - 2024-06-13

Added

Fixed

  • Fixed a precompilation bug that would cause creating a sysimage with PackageCompiler.jl on Julia 1.6 to fail (#242).

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).
+Changelog · ZMQ.jl

Changelog

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

v1.4.0 - 2024-11-30

Added

v1.3.0 - 2024-08-03

Added

Deprecated

  • The Base.convert(IOStream, ::Message) method has been deprecated due to buggy behaviour, use IOBuffer(msg) instead (#247).

Fixed

  • Fixed isfreed(), which would previously return the wrong values (#245).

v1.2.6 - 2024-06-13

Added

Fixed

  • Fixed a precompilation bug that would cause creating a sysimage with PackageCompiler.jl on Julia 1.6 to fail (#242).

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 2eb6656..1072855 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 871cad2..c40aa41 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 1b332aa..cc8166f 100644 --- a/dev/man/guide/index.html +++ b/dev/man/guide/index.html @@ -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/reference/index.html b/dev/reference/index.html index 4b0b250..71b4e64 100644 --- a/dev/reference/index.html +++ b/dev/reference/index.html @@ -1,5 +1,5 @@ -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.send_multipartFunction
send_multipart(socket::Socket, parts)

Send a multipart message composed of the elements in parts. parts may be any object that supports getindex(), eachindex(), and lastindex().

source

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

Messages

ZMQ.MessageType
mutable struct Message <: AbstractArray{UInt8, 1}

High-level Message object for sending/receiving ZMQ messages in shared buffers. As an AbstractArray, it supports common (non-resizeable) array behaviour.

Examples

julia> using ZMQ
+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.send_multipartFunction
send_multipart(socket::Socket, parts)

Send a multipart message composed of the elements in parts. parts may be any object that supports getindex(), eachindex(), and lastindex().

source

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

Messages

ZMQ.MessageType
mutable struct Message <: AbstractArray{UInt8, 1}

High-level Message object for sending/receiving ZMQ messages in shared buffers. As an AbstractArray, it supports common (non-resizeable) array behaviour.

Examples

julia> using ZMQ
 
 julia> m = Message("foo");
 
@@ -12,4 +12,4 @@
 "fog"
 
 julia> IOBuffer(m)           # Create a zero-copy IOBuffer
-IOBuffer(data=UInt8[...], readable=true, writable=false, seekable=true, append=false, size=3, maxsize=Inf, ptr=1, mark=-1)
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
ZMQ.MessageMethod
Message(a::T) where T <: DenseVector

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

Usually a will be a 1D Array/Vector, but on Julia 1.11+ it can also be a Memory.

source
ZMQ.isfreedMethod
isfreed(m::Message)

Check whether zeromq has called our free-function, i.e. whether we are safe to reclaim ownership of any buffer object the Message was created with.

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
+IOBuffer(data=UInt8[...], readable=true, writable=false, seekable=true, append=false, size=3, maxsize=Inf, ptr=1, mark=-1)
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
ZMQ.MessageMethod
Message(a::T) where T <: DenseVector

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

Usually a will be a 1D Array/Vector, but on Julia 1.11+ it can also be a Memory.

source
ZMQ.isfreedMethod
isfreed(m::Message)

Check whether zeromq has called our free-function, i.e. whether we are safe to reclaim ownership of any buffer object the Message was created with.

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