diff options
author | Hanoh Haim <hhaim@cisco.com> | 2015-08-23 15:26:27 +0300 |
---|---|---|
committer | Hanoh Haim <hhaim@cisco.com> | 2015-08-23 15:26:27 +0300 |
commit | 449198c97d2794b44b461093265637522b7a64b4 (patch) | |
tree | 36eb68c83b907474f507f5e8cde72856e29414bb /src/console/zmq/backend/cython/context.pxd | |
parent | b156bb3ae7382481ed5f15e42d87cd3012870da5 (diff) | |
parent | 8384612b8493a4a896e91e3bb9d5d25689a87c12 (diff) |
rpc integration
Diffstat (limited to 'src/console/zmq/backend/cython/context.pxd')
-rw-r--r-- | src/console/zmq/backend/cython/context.pxd | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/console/zmq/backend/cython/context.pxd b/src/console/zmq/backend/cython/context.pxd new file mode 100644 index 00000000..9c9267a5 --- /dev/null +++ b/src/console/zmq/backend/cython/context.pxd @@ -0,0 +1,41 @@ +"""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 void **_sockets # A C-array containg socket handles + cdef size_t _n_sockets # the number of sockets + cdef size_t _max_sockets # the size of the _sockets array + 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) + # helpers for events on _sockets in Socket.__cinit__()/close() + cdef inline void _add_socket(self, void* handle) + cdef inline void _remove_socket(self, void* handle) + |