From 4d60eab62ca03b9091a3ed5afdbcc67ccbcaff2e Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Sun, 12 May 2024 16:49:06 +0000 Subject: [PATCH] build based on 975376d --- dev/.documenter-siteinfo.json | 2 +- dev/index.html | 2 +- dev/man/examples/index.html | 2 +- dev/man/guide/index.html | 2 +- dev/objects.inv | Bin 456 -> 456 bytes dev/reference/index.html | 2 +- 6 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index ebd0873..720828c 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.3","generation_timestamp":"2024-05-12T16:34:47","documenter_version":"1.4.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.3","generation_timestamp":"2024-05-12T16:49:04","documenter_version":"1.4.1"}} \ No newline at end of file diff --git a/dev/index.html b/dev/index.html index 0bf2073..fa10924 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 4e7a063..a6c5e15 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 2eb9921..93e1163 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/objects.inv b/dev/objects.inv index 5f6522bf03a364914e0c7b47ddea73c5e88a3933..e45ff228954b697cd76b27224b5bc32596d81f20 100644 GIT binary patch delta 12 TcmX@Xe1ds`9i#C^`%Xpx9YX{Y delta 12 TcmX@Xe1ds`9i!1k`%Xpx9X -Reference · ZMQ.jl

Reference

Sockets

The ZMQ Socket type:

ZMQ.SocketType

A ZMQ socket.

Socket(typ::Integer)

Create a socket of a certain type.


Socket(ctx::Context, typ::Integer)

Create a socket in a given context.


Socket(f::Function, args...)

Do-block constructor.

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.

Message()

Create an empty message (for receive).


Message(len::Integer)

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


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.


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.


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.


Message(a::Array)

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


Message(io::IOBuffer)

Create a message with an IOBuffer 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.SocketType

A ZMQ socket.

Socket(typ::Integer)

Create a socket of a certain type.


Socket(ctx::Context, typ::Integer)

Create a socket in a given context.


Socket(f::Function, args...)

Do-block constructor.

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.

Message()

Create an empty message (for receive).


Message(len::Integer)

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


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.


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.


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.


Message(a::Array)

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


Message(io::IOBuffer)

Create a message with an IOBuffer 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