def new(type, filename=None, line_nbr=None): if filename is None: frame = inspect.stack()[1][0] info = inspect.getframeinfo(frame) filename = info.filename line_nbr = info.lineno return ffi.gc(C.zsock_new(type, filename, line_nbr), destroy)
def new(ctx, typ): """ Create a new socket within our CZMQ context, replaces zmq_socket. Use this to get automatic management of the socket at shutdown. Note: SUB sockets do not automatically subscribe to everything; you must set filters explicitly. """ return ffi.gc(C.zsocket_new(ctx, typ), lambda s: destroy(ctx, s))
def new(ctx): """ Install authentication for the specified context. Returns a new zauth object that you can use to configure authentication. Note that until you add policies, all incoming NULL connections are allowed (classic ZeroMQ behaviour), and all PLAIN and CURVE connections are denied. If there was an error during initialization, returns NULL. """ return ffi.gc(zauth_new(ctx), destroy)
def new(ctx): """ Install authentication for the specified context. Returns a new zauth object that you can use to configure authentication. Note that until you add policies, all incoming NULL connections are allowed (classic ZeroMQ behaviour), and all PLAIN and CURVE connections are denied. If there was an error during initialization, returns NULL. """ return ffi.gc(C.zauth_new(ctx), destroy)
def new(location): """ Create a new certificate store from a disk directory, loading and indexing all certificates in that location. The directory itself may be absent, and created later, or modified at any time. The certificate store is automatically refreshed on any zcertstore_lookup() call. If the location is specified as NULL, creates a pure-memory store, which you can work with by inserting certificates at runtime. The location is treated as a printf format. """ return ffi.gc(C.zcertstore_new(location), destroy)
def new(task, args): """Create a new actor passing arbitrary arguments reference.""" return ffi.gc(C.zactor_new(task, ffi.new_handle(args)), destroy)
def new(ctx, port): """Create a new beacon on a certain UDP port """ return ffi.gc(C.zbeacon_new(ctx, port), destroy)
def new(): """ Create new context. """ return ffi.gc(C.zctx_new(), destroy)
def new(): """Create a new zloop reactor""" return ffi.gc(C.zloop_new(), destroy)
def new_from(public_key, secret_key): """Constructor, accepts public/secret key pair from caller """ return ffi.gc(C.zcert_new_from(public_key, secret_key), destroy)
def new(): """Create and initialize a new certificate in memory """ return ffi.gc(C.zcert_new(), destroy)
def new(reader, *readers): """Create new poller""" return ffi.gc(C.zpoller_new(reader, *readers), destroy)
def new(reader, *readers): """Create new poller""" readers = list(readers) + [ffi.NULL] return ffi.gc(C.zpoller_new(reader, *readers), destroy)