mirror of
https://github.com/aykhans/AzSuicideDataVisualization.git
synced 2025-07-02 14:27:31 +00:00
first commit
This commit is contained in:
3
.venv/Lib/site-packages/zmq/backend/cython/__init__.pxd
Normal file
3
.venv/Lib/site-packages/zmq/backend/cython/__init__.pxd
Normal file
@ -0,0 +1,3 @@
|
||||
from zmq.backend.cython.context cimport Context
|
||||
from zmq.backend.cython.message cimport Frame
|
||||
from zmq.backend.cython.socket cimport Socket
|
40
.venv/Lib/site-packages/zmq/backend/cython/__init__.py
Normal file
40
.venv/Lib/site-packages/zmq/backend/cython/__init__.py
Normal file
@ -0,0 +1,40 @@
|
||||
"""Python bindings for core 0MQ objects."""
|
||||
|
||||
# Copyright (C) PyZMQ Developers
|
||||
# Distributed under the terms of the Lesser GNU Public License (LGPL).
|
||||
|
||||
from . import (
|
||||
_device,
|
||||
_poll,
|
||||
_proxy_steerable,
|
||||
_version,
|
||||
context,
|
||||
error,
|
||||
message,
|
||||
socket,
|
||||
utils,
|
||||
)
|
||||
|
||||
__all__ = []
|
||||
for submod in (
|
||||
error,
|
||||
message,
|
||||
context,
|
||||
socket,
|
||||
utils,
|
||||
_poll,
|
||||
_version,
|
||||
_device,
|
||||
_proxy_steerable,
|
||||
):
|
||||
__all__.extend(submod.__all__)
|
||||
|
||||
from ._device import * # noqa
|
||||
from ._poll import * # noqa
|
||||
from ._proxy_steerable import * # noqa
|
||||
from ._version import * # noqa
|
||||
from .context import * # noqa
|
||||
from .error import * # noqa
|
||||
from .message import * # noqa
|
||||
from .socket import * # noqa
|
||||
from .utils import * # noqa
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
29
.venv/Lib/site-packages/zmq/backend/cython/checkrc.pxd
Normal file
29
.venv/Lib/site-packages/zmq/backend/cython/checkrc.pxd
Normal file
@ -0,0 +1,29 @@
|
||||
from cpython cimport PyErr_CheckSignals
|
||||
from libc.errno cimport EAGAIN, EINTR
|
||||
|
||||
from .libzmq cimport ZMQ_ETERM, zmq_errno
|
||||
|
||||
|
||||
cdef inline int _check_rc(int rc, bint error_without_errno=True) except -1:
|
||||
"""internal utility for checking zmq return condition
|
||||
|
||||
and raising the appropriate Exception class
|
||||
"""
|
||||
cdef int errno = zmq_errno()
|
||||
PyErr_CheckSignals()
|
||||
if errno == 0 and not error_without_errno:
|
||||
return 0
|
||||
if rc == -1: # if rc < -1, it's a bug in libzmq. Should we warn?
|
||||
if errno == EINTR:
|
||||
from zmq.error import InterruptedSystemCall
|
||||
raise InterruptedSystemCall(errno)
|
||||
elif errno == EAGAIN:
|
||||
from zmq.error import Again
|
||||
raise Again(errno)
|
||||
elif errno == ZMQ_ETERM:
|
||||
from zmq.error import ContextTerminated
|
||||
raise ContextTerminated(errno)
|
||||
else:
|
||||
from zmq.error import ZMQError
|
||||
raise ZMQError(errno)
|
||||
return 0
|
228
.venv/Lib/site-packages/zmq/backend/cython/constant_enums.pxi
Normal file
228
.venv/Lib/site-packages/zmq/backend/cython/constant_enums.pxi
Normal file
@ -0,0 +1,228 @@
|
||||
cdef extern from "zmq.h" nogil:
|
||||
enum: PYZMQ_DRAFT_API
|
||||
enum: ZMQ_VERSION
|
||||
enum: ZMQ_VERSION_MAJOR
|
||||
enum: ZMQ_VERSION_MINOR
|
||||
enum: ZMQ_VERSION_PATCH
|
||||
enum: ZMQ_IO_THREADS
|
||||
enum: ZMQ_MAX_SOCKETS
|
||||
enum: ZMQ_SOCKET_LIMIT
|
||||
enum: ZMQ_THREAD_PRIORITY
|
||||
enum: ZMQ_THREAD_SCHED_POLICY
|
||||
enum: ZMQ_MAX_MSGSZ
|
||||
enum: ZMQ_MSG_T_SIZE
|
||||
enum: ZMQ_THREAD_AFFINITY_CPU_ADD
|
||||
enum: ZMQ_THREAD_AFFINITY_CPU_REMOVE
|
||||
enum: ZMQ_THREAD_NAME_PREFIX
|
||||
enum: ZMQ_STREAMER
|
||||
enum: ZMQ_FORWARDER
|
||||
enum: ZMQ_QUEUE
|
||||
enum: ZMQ_EAGAIN "EAGAIN"
|
||||
enum: ZMQ_EFAULT "EFAULT"
|
||||
enum: ZMQ_EINVAL "EINVAL"
|
||||
enum: ZMQ_ENOTSUP "ENOTSUP"
|
||||
enum: ZMQ_EPROTONOSUPPORT "EPROTONOSUPPORT"
|
||||
enum: ZMQ_ENOBUFS "ENOBUFS"
|
||||
enum: ZMQ_ENETDOWN "ENETDOWN"
|
||||
enum: ZMQ_EADDRINUSE "EADDRINUSE"
|
||||
enum: ZMQ_EADDRNOTAVAIL "EADDRNOTAVAIL"
|
||||
enum: ZMQ_ECONNREFUSED "ECONNREFUSED"
|
||||
enum: ZMQ_EINPROGRESS "EINPROGRESS"
|
||||
enum: ZMQ_ENOTSOCK "ENOTSOCK"
|
||||
enum: ZMQ_EMSGSIZE "EMSGSIZE"
|
||||
enum: ZMQ_EAFNOSUPPORT "EAFNOSUPPORT"
|
||||
enum: ZMQ_ENETUNREACH "ENETUNREACH"
|
||||
enum: ZMQ_ECONNABORTED "ECONNABORTED"
|
||||
enum: ZMQ_ECONNRESET "ECONNRESET"
|
||||
enum: ZMQ_ENOTCONN "ENOTCONN"
|
||||
enum: ZMQ_ETIMEDOUT "ETIMEDOUT"
|
||||
enum: ZMQ_EHOSTUNREACH "EHOSTUNREACH"
|
||||
enum: ZMQ_ENETRESET "ENETRESET"
|
||||
enum: ZMQ_EFSM "EFSM"
|
||||
enum: ZMQ_ENOCOMPATPROTO "ENOCOMPATPROTO"
|
||||
enum: ZMQ_ETERM "ETERM"
|
||||
enum: ZMQ_EMTHREAD "EMTHREAD"
|
||||
enum: ZMQ_EVENT_CONNECTED
|
||||
enum: ZMQ_EVENT_CONNECT_DELAYED
|
||||
enum: ZMQ_EVENT_CONNECT_RETRIED
|
||||
enum: ZMQ_EVENT_LISTENING
|
||||
enum: ZMQ_EVENT_BIND_FAILED
|
||||
enum: ZMQ_EVENT_ACCEPTED
|
||||
enum: ZMQ_EVENT_ACCEPT_FAILED
|
||||
enum: ZMQ_EVENT_CLOSED
|
||||
enum: ZMQ_EVENT_CLOSE_FAILED
|
||||
enum: ZMQ_EVENT_DISCONNECTED
|
||||
enum: ZMQ_EVENT_MONITOR_STOPPED
|
||||
enum: ZMQ_EVENT_ALL
|
||||
enum: ZMQ_HANDSHAKE_FAILED_NO_DETAIL
|
||||
enum: ZMQ_HANDSHAKE_SUCCEEDED
|
||||
enum: ZMQ_HANDSHAKE_FAILED_PROTOCOL
|
||||
enum: ZMQ_HANDSHAKE_FAILED_AUTH
|
||||
enum: ZMQ_PROTOCOL_ERROR_ZMTP_UNSPECIFIED
|
||||
enum: ZMQ_PROTOCOL_ERROR_ZMTP_UNEXPECTED_COMMAND
|
||||
enum: ZMQ_PROTOCOL_ERROR_ZMTP_INVALID_SEQUENCE
|
||||
enum: ZMQ_PROTOCOL_ERROR_ZMTP_KEY_EXCHANGE
|
||||
enum: ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_UNSPECIFIED
|
||||
enum: ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_MESSAGE
|
||||
enum: ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_HELLO
|
||||
enum: ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_INITIATE
|
||||
enum: ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_ERROR
|
||||
enum: ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_READY
|
||||
enum: ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_WELCOME
|
||||
enum: ZMQ_PROTOCOL_ERROR_ZMTP_INVALID_METADATA
|
||||
enum: ZMQ_PROTOCOL_ERROR_ZMTP_CRYPTOGRAPHIC
|
||||
enum: ZMQ_PROTOCOL_ERROR_ZMTP_MECHANISM_MISMATCH
|
||||
enum: ZMQ_PROTOCOL_ERROR_ZAP_UNSPECIFIED
|
||||
enum: ZMQ_PROTOCOL_ERROR_ZAP_MALFORMED_REPLY
|
||||
enum: ZMQ_PROTOCOL_ERROR_ZAP_BAD_REQUEST_ID
|
||||
enum: ZMQ_PROTOCOL_ERROR_ZAP_BAD_VERSION
|
||||
enum: ZMQ_PROTOCOL_ERROR_ZAP_INVALID_STATUS_CODE
|
||||
enum: ZMQ_PROTOCOL_ERROR_ZAP_INVALID_METADATA
|
||||
enum: ZMQ_PROTOCOL_ERROR_WS_UNSPECIFIED
|
||||
enum: ZMQ_EVENT_PIPES_STATS
|
||||
enum: ZMQ_EVENT_ALL_V1
|
||||
enum: ZMQ_EVENT_ALL_V2
|
||||
enum: ZMQ_DONTWAIT
|
||||
enum: ZMQ_SNDMORE
|
||||
enum: ZMQ_NOBLOCK
|
||||
enum: ZMQ_MORE
|
||||
enum: ZMQ_SHARED
|
||||
enum: ZMQ_SRCFD
|
||||
enum: ZMQ_POLLIN
|
||||
enum: ZMQ_POLLOUT
|
||||
enum: ZMQ_POLLERR
|
||||
enum: ZMQ_POLLPRI
|
||||
enum: ZMQ_NULL
|
||||
enum: ZMQ_PLAIN
|
||||
enum: ZMQ_CURVE
|
||||
enum: ZMQ_GSSAPI
|
||||
enum: ZMQ_HWM
|
||||
enum: ZMQ_AFFINITY
|
||||
enum: ZMQ_ROUTING_ID
|
||||
enum: ZMQ_SUBSCRIBE
|
||||
enum: ZMQ_UNSUBSCRIBE
|
||||
enum: ZMQ_RATE
|
||||
enum: ZMQ_RECOVERY_IVL
|
||||
enum: ZMQ_SNDBUF
|
||||
enum: ZMQ_RCVBUF
|
||||
enum: ZMQ_RCVMORE
|
||||
enum: ZMQ_FD
|
||||
enum: ZMQ_EVENTS
|
||||
enum: ZMQ_TYPE
|
||||
enum: ZMQ_LINGER
|
||||
enum: ZMQ_RECONNECT_IVL
|
||||
enum: ZMQ_BACKLOG
|
||||
enum: ZMQ_RECONNECT_IVL_MAX
|
||||
enum: ZMQ_MAXMSGSIZE
|
||||
enum: ZMQ_SNDHWM
|
||||
enum: ZMQ_RCVHWM
|
||||
enum: ZMQ_MULTICAST_HOPS
|
||||
enum: ZMQ_RCVTIMEO
|
||||
enum: ZMQ_SNDTIMEO
|
||||
enum: ZMQ_LAST_ENDPOINT
|
||||
enum: ZMQ_ROUTER_MANDATORY
|
||||
enum: ZMQ_TCP_KEEPALIVE
|
||||
enum: ZMQ_TCP_KEEPALIVE_CNT
|
||||
enum: ZMQ_TCP_KEEPALIVE_IDLE
|
||||
enum: ZMQ_TCP_KEEPALIVE_INTVL
|
||||
enum: ZMQ_IMMEDIATE
|
||||
enum: ZMQ_XPUB_VERBOSE
|
||||
enum: ZMQ_ROUTER_RAW
|
||||
enum: ZMQ_IPV6
|
||||
enum: ZMQ_MECHANISM
|
||||
enum: ZMQ_PLAIN_SERVER
|
||||
enum: ZMQ_PLAIN_USERNAME
|
||||
enum: ZMQ_PLAIN_PASSWORD
|
||||
enum: ZMQ_CURVE_SERVER
|
||||
enum: ZMQ_CURVE_PUBLICKEY
|
||||
enum: ZMQ_CURVE_SECRETKEY
|
||||
enum: ZMQ_CURVE_SERVERKEY
|
||||
enum: ZMQ_PROBE_ROUTER
|
||||
enum: ZMQ_REQ_CORRELATE
|
||||
enum: ZMQ_REQ_RELAXED
|
||||
enum: ZMQ_CONFLATE
|
||||
enum: ZMQ_ZAP_DOMAIN
|
||||
enum: ZMQ_ROUTER_HANDOVER
|
||||
enum: ZMQ_TOS
|
||||
enum: ZMQ_CONNECT_ROUTING_ID
|
||||
enum: ZMQ_GSSAPI_SERVER
|
||||
enum: ZMQ_GSSAPI_PRINCIPAL
|
||||
enum: ZMQ_GSSAPI_SERVICE_PRINCIPAL
|
||||
enum: ZMQ_GSSAPI_PLAINTEXT
|
||||
enum: ZMQ_HANDSHAKE_IVL
|
||||
enum: ZMQ_SOCKS_PROXY
|
||||
enum: ZMQ_XPUB_NODROP
|
||||
enum: ZMQ_BLOCKY
|
||||
enum: ZMQ_XPUB_MANUAL
|
||||
enum: ZMQ_XPUB_WELCOME_MSG
|
||||
enum: ZMQ_STREAM_NOTIFY
|
||||
enum: ZMQ_INVERT_MATCHING
|
||||
enum: ZMQ_HEARTBEAT_IVL
|
||||
enum: ZMQ_HEARTBEAT_TTL
|
||||
enum: ZMQ_HEARTBEAT_TIMEOUT
|
||||
enum: ZMQ_XPUB_VERBOSER
|
||||
enum: ZMQ_CONNECT_TIMEOUT
|
||||
enum: ZMQ_TCP_MAXRT
|
||||
enum: ZMQ_THREAD_SAFE
|
||||
enum: ZMQ_MULTICAST_MAXTPDU
|
||||
enum: ZMQ_VMCI_BUFFER_SIZE
|
||||
enum: ZMQ_VMCI_BUFFER_MIN_SIZE
|
||||
enum: ZMQ_VMCI_BUFFER_MAX_SIZE
|
||||
enum: ZMQ_VMCI_CONNECT_TIMEOUT
|
||||
enum: ZMQ_USE_FD
|
||||
enum: ZMQ_GSSAPI_PRINCIPAL_NAMETYPE
|
||||
enum: ZMQ_GSSAPI_SERVICE_PRINCIPAL_NAMETYPE
|
||||
enum: ZMQ_BINDTODEVICE
|
||||
enum: ZMQ_IDENTITY
|
||||
enum: ZMQ_CONNECT_RID
|
||||
enum: ZMQ_TCP_ACCEPT_FILTER
|
||||
enum: ZMQ_IPC_FILTER_PID
|
||||
enum: ZMQ_IPC_FILTER_UID
|
||||
enum: ZMQ_IPC_FILTER_GID
|
||||
enum: ZMQ_IPV4ONLY
|
||||
enum: ZMQ_DELAY_ATTACH_ON_CONNECT
|
||||
enum: ZMQ_FAIL_UNROUTABLE
|
||||
enum: ZMQ_ROUTER_BEHAVIOR
|
||||
enum: ZMQ_ZAP_ENFORCE_DOMAIN
|
||||
enum: ZMQ_LOOPBACK_FASTPATH
|
||||
enum: ZMQ_METADATA
|
||||
enum: ZMQ_MULTICAST_LOOP
|
||||
enum: ZMQ_ROUTER_NOTIFY
|
||||
enum: ZMQ_XPUB_MANUAL_LAST_VALUE
|
||||
enum: ZMQ_SOCKS_USERNAME
|
||||
enum: ZMQ_SOCKS_PASSWORD
|
||||
enum: ZMQ_IN_BATCH_SIZE
|
||||
enum: ZMQ_OUT_BATCH_SIZE
|
||||
enum: ZMQ_WSS_KEY_PEM
|
||||
enum: ZMQ_WSS_CERT_PEM
|
||||
enum: ZMQ_WSS_TRUST_PEM
|
||||
enum: ZMQ_WSS_HOSTNAME
|
||||
enum: ZMQ_WSS_TRUST_SYSTEM
|
||||
enum: ZMQ_ONLY_FIRST_SUBSCRIBE
|
||||
enum: ZMQ_RECONNECT_STOP
|
||||
enum: ZMQ_HELLO_MSG
|
||||
enum: ZMQ_DISCONNECT_MSG
|
||||
enum: ZMQ_PRIORITY
|
||||
enum: ZMQ_PAIR
|
||||
enum: ZMQ_PUB
|
||||
enum: ZMQ_SUB
|
||||
enum: ZMQ_REQ
|
||||
enum: ZMQ_REP
|
||||
enum: ZMQ_DEALER
|
||||
enum: ZMQ_ROUTER
|
||||
enum: ZMQ_PULL
|
||||
enum: ZMQ_PUSH
|
||||
enum: ZMQ_XPUB
|
||||
enum: ZMQ_XSUB
|
||||
enum: ZMQ_STREAM
|
||||
enum: ZMQ_XREQ
|
||||
enum: ZMQ_XREP
|
||||
enum: ZMQ_SERVER
|
||||
enum: ZMQ_CLIENT
|
||||
enum: ZMQ_RADIO
|
||||
enum: ZMQ_DISH
|
||||
enum: ZMQ_GATHER
|
||||
enum: ZMQ_SCATTER
|
||||
enum: ZMQ_DGRAM
|
||||
enum: ZMQ_PEER
|
||||
enum: ZMQ_CHANNEL
|
Binary file not shown.
34
.venv/Lib/site-packages/zmq/backend/cython/context.pxd
Normal file
34
.venv/Lib/site-packages/zmq/backend/cython/context.pxd
Normal file
@ -0,0 +1,34 @@
|
||||
"""0MQ Context class declaration."""
|
||||
|
||||
#
|
||||
# Copyright (c) 2010-2011 Brian E. Granger & Min Ragan-Kelley
|
||||
#
|
||||
# This file is part of pyzmq.
|
||||
#
|
||||
# pyzmq is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the Lesser GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# pyzmq is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# Lesser GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the Lesser GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Code
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
cdef class Context:
|
||||
|
||||
cdef object __weakref__ # enable weakref
|
||||
cdef void *handle # The C handle for the underlying zmq object.
|
||||
cdef bint _shadow # whether the Context is a shadow wrapper of another
|
||||
cdef int _pid # the pid of the process which created me (for fork safety)
|
||||
|
||||
cdef public bint closed # bool property for a closed context.
|
||||
cdef inline int _term(self)
|
Binary file not shown.
122
.venv/Lib/site-packages/zmq/backend/cython/libzmq.pxd
Normal file
122
.venv/Lib/site-packages/zmq/backend/cython/libzmq.pxd
Normal file
@ -0,0 +1,122 @@
|
||||
"""All the C imports for 0MQ"""
|
||||
|
||||
#
|
||||
# Copyright (c) 2010 Brian E. Granger & Min Ragan-Kelley
|
||||
#
|
||||
# This file is part of pyzmq.
|
||||
#
|
||||
# pyzmq is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the Lesser GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# pyzmq is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# Lesser GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the Lesser GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Imports
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Import the C header files
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# common includes, such as zmq compat, pyversion_compat
|
||||
# make sure we load pyversion compat in every Cython module
|
||||
cdef extern from "pyversion_compat.h":
|
||||
pass
|
||||
|
||||
# were it not for Windows,
|
||||
# we could cimport these from libc.stdint
|
||||
cdef extern from "zmq_compat.h":
|
||||
ctypedef signed long long int64_t "pyzmq_int64_t"
|
||||
ctypedef unsigned int uint32_t "pyzmq_uint32_t"
|
||||
|
||||
include "constant_enums.pxi"
|
||||
|
||||
cdef extern from "zmq.h" nogil:
|
||||
|
||||
void _zmq_version "zmq_version"(int *major, int *minor, int *patch)
|
||||
|
||||
ctypedef int fd_t "ZMQ_FD_T"
|
||||
|
||||
enum: errno
|
||||
const char *zmq_strerror (int errnum)
|
||||
int zmq_errno()
|
||||
|
||||
void *zmq_ctx_new ()
|
||||
int zmq_ctx_destroy (void *context)
|
||||
int zmq_ctx_set (void *context, int option, int optval)
|
||||
int zmq_ctx_get (void *context, int option)
|
||||
void *zmq_init (int io_threads)
|
||||
int zmq_term (void *context)
|
||||
|
||||
# blackbox def for zmq_msg_t
|
||||
ctypedef void * zmq_msg_t "zmq_msg_t"
|
||||
|
||||
ctypedef void zmq_free_fn(void *data, void *hint)
|
||||
|
||||
int zmq_msg_init (zmq_msg_t *msg)
|
||||
int zmq_msg_init_size (zmq_msg_t *msg, size_t size)
|
||||
int zmq_msg_init_data (zmq_msg_t *msg, void *data,
|
||||
size_t size, zmq_free_fn *ffn, void *hint)
|
||||
int zmq_msg_send (zmq_msg_t *msg, void *s, int flags)
|
||||
int zmq_msg_recv (zmq_msg_t *msg, void *s, int flags)
|
||||
int zmq_msg_close (zmq_msg_t *msg)
|
||||
int zmq_msg_move (zmq_msg_t *dest, zmq_msg_t *src)
|
||||
int zmq_msg_copy (zmq_msg_t *dest, zmq_msg_t *src)
|
||||
void *zmq_msg_data (zmq_msg_t *msg)
|
||||
size_t zmq_msg_size (zmq_msg_t *msg)
|
||||
int zmq_msg_more (zmq_msg_t *msg)
|
||||
int zmq_msg_get (zmq_msg_t *msg, int option)
|
||||
int zmq_msg_set (zmq_msg_t *msg, int option, int optval)
|
||||
const char *zmq_msg_gets (zmq_msg_t *msg, const char *property)
|
||||
int zmq_has (const char *capability)
|
||||
|
||||
void *zmq_socket (void *context, int type)
|
||||
int zmq_close (void *s)
|
||||
int zmq_setsockopt (void *s, int option, void *optval, size_t optvallen)
|
||||
int zmq_getsockopt (void *s, int option, void *optval, size_t *optvallen)
|
||||
int zmq_bind (void *s, char *addr)
|
||||
int zmq_connect (void *s, char *addr)
|
||||
int zmq_unbind (void *s, char *addr)
|
||||
int zmq_disconnect (void *s, char *addr)
|
||||
|
||||
int zmq_socket_monitor (void *s, char *addr, int flags)
|
||||
|
||||
# send/recv
|
||||
int zmq_sendbuf (void *s, const void *buf, size_t n, int flags)
|
||||
int zmq_recvbuf (void *s, void *buf, size_t n, int flags)
|
||||
|
||||
ctypedef struct zmq_pollitem_t:
|
||||
void *socket
|
||||
fd_t fd
|
||||
short events
|
||||
short revents
|
||||
|
||||
int zmq_poll (zmq_pollitem_t *items, int nitems, long timeout)
|
||||
|
||||
int zmq_device (int device_, void *insocket_, void *outsocket_)
|
||||
int zmq_proxy (void *frontend, void *backend, void *capture)
|
||||
int zmq_proxy_steerable (void *frontend,
|
||||
void *backend,
|
||||
void *capture,
|
||||
void *control)
|
||||
|
||||
int zmq_curve_keypair (char *z85_public_key, char *z85_secret_key)
|
||||
int zmq_curve_public (char *z85_public_key, char *z85_secret_key)
|
||||
|
||||
# 4.2 draft
|
||||
int zmq_join (void *s, const char *group)
|
||||
int zmq_leave (void *s, const char *group)
|
||||
|
||||
int zmq_msg_set_routing_id(zmq_msg_t *msg, uint32_t routing_id)
|
||||
uint32_t zmq_msg_routing_id(zmq_msg_t *msg)
|
||||
int zmq_msg_set_group(zmq_msg_t *msg, const char *group)
|
||||
const char *zmq_msg_group(zmq_msg_t *msg)
|
Binary file not shown.
61
.venv/Lib/site-packages/zmq/backend/cython/message.pxd
Normal file
61
.venv/Lib/site-packages/zmq/backend/cython/message.pxd
Normal file
@ -0,0 +1,61 @@
|
||||
"""0MQ Message related class declarations."""
|
||||
|
||||
#
|
||||
# Copyright (c) 2010-2011 Brian E. Granger & Min Ragan-Kelley
|
||||
#
|
||||
# This file is part of pyzmq.
|
||||
#
|
||||
# pyzmq is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the Lesser GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# pyzmq is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# Lesser GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the Lesser GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Imports
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
from cpython cimport PyBytes_FromStringAndSize
|
||||
|
||||
from zmq.backend.cython.libzmq cimport zmq_msg_data, zmq_msg_size, zmq_msg_t
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Code
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
cdef class MessageTracker(object):
|
||||
|
||||
cdef set events # Message Event objects to track.
|
||||
cdef set peers # Other Message or MessageTracker objects.
|
||||
|
||||
|
||||
cdef class Frame:
|
||||
|
||||
cdef zmq_msg_t zmq_msg
|
||||
cdef object _data # The actual message data as a Python object.
|
||||
cdef object _buffer # A Python Buffer/View of the message contents
|
||||
cdef object _bytes # A bytes/str copy of the message.
|
||||
cdef bint _failed_init # Flag to handle failed zmq_msg_init
|
||||
cdef public object tracker_event # Event for use with zmq_free_fn.
|
||||
cdef public object tracker # MessageTracker object.
|
||||
cdef public bint more # whether RCVMORE was set
|
||||
|
||||
cdef Frame fast_copy(self) # Create shallow copy of Message object.
|
||||
cdef object _getbuffer(self) # Construct self._buffer.
|
||||
|
||||
|
||||
cdef inline object copy_zmq_msg_bytes(zmq_msg_t *zmq_msg):
|
||||
""" Copy the data from a zmq_msg_t """
|
||||
cdef char *data_c = NULL
|
||||
cdef Py_ssize_t data_len_c
|
||||
data_c = <char *>zmq_msg_data(zmq_msg)
|
||||
data_len_c = zmq_msg_size(zmq_msg)
|
||||
return PyBytes_FromStringAndSize(data_c, data_len_c)
|
Binary file not shown.
48
.venv/Lib/site-packages/zmq/backend/cython/socket.pxd
Normal file
48
.venv/Lib/site-packages/zmq/backend/cython/socket.pxd
Normal file
@ -0,0 +1,48 @@
|
||||
"""0MQ Socket class declaration."""
|
||||
|
||||
#
|
||||
# Copyright (c) 2010-2011 Brian E. Granger & Min Ragan-Kelley
|
||||
#
|
||||
# This file is part of pyzmq.
|
||||
#
|
||||
# pyzmq is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the Lesser GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# pyzmq is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# Lesser GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the Lesser GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Imports
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
from .context cimport Context
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Code
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
cdef class Socket:
|
||||
|
||||
cdef object __weakref__ # enable weakref
|
||||
cdef void *handle # The C handle for the underlying zmq object.
|
||||
cdef bint _shadow # whether the Socket is a shadow wrapper of another
|
||||
# Hold on to a reference to the context to make sure it is not garbage
|
||||
# collected until the socket it done with it.
|
||||
cdef public Context context # The zmq Context object that owns this.
|
||||
cdef public bint _closed # bool property for a closed socket.
|
||||
cdef public int copy_threshold # threshold below which pyzmq will always copy messages
|
||||
cdef int _pid # the pid of the process which created me (for fork safety)
|
||||
cdef void _c_close(self) # underlying close of zmq socket
|
||||
|
||||
# cpdef methods for direct-cython access:
|
||||
cpdef object send(self, object data, int flags=*, copy=*, track=*)
|
||||
cpdef object recv(self, int flags=*, copy=*, track=*)
|
Binary file not shown.
Reference in New Issue
Block a user