{ "data", luazmq_msg_data }, { "set_data", luazmq_msg_set_data }, { "more", luazmq_msg_more }, { "get", luazmq_msg_get }, { "set", luazmq_msg_set }, { "send", luazmq_msg_send }, { "send_more", luazmq_msg_send_more }, { "recv", luazmq_msg_recv }, { "__tostring", luazmq_msg_data }, { "__gc", luazmq_msg_close }, { NULL, NULL }, }; static const luazmq_int_const msg_options[] ={ DEFINE_ZMQ_CONST( MORE ), {NULL, 0} }; void luazmq_message_initlib(lua_State *L, int nup){ #ifdef LUAZMQ_DEBUG int top = lua_gettop(L); #endif luazmq_createmeta(L, LUAZMQ_MESSAGE, luazmq_msg_methods, nup); lua_pop(L, 1); #ifdef LUAZMQ_DEBUG assert(top == (lua_gettop(L) + nup)); #endif
#if defined(ZMQ_HANDSHAKE_IVL) REGISTER_SKT_OPT_RW(handshake_ivl ), #endif #if defined(ZMQ_IDENTITY_FD) REGISTER_SKT_OPT_RO(identity_fd ), #endif #if defined(ZMQ_SOCKS_PROXY) REGISTER_SKT_OPT_RW(socks_proxy ), #endif //} {NULL,NULL} }; static const luazmq_int_const skt_types[] ={ DEFINE_ZMQ_CONST( PAIR ), DEFINE_ZMQ_CONST( PUB ), DEFINE_ZMQ_CONST( SUB ), DEFINE_ZMQ_CONST( REQ ), DEFINE_ZMQ_CONST( REP ), DEFINE_ZMQ_CONST( DEALER ), DEFINE_ZMQ_CONST( ROUTER ), DEFINE_ZMQ_CONST( PULL ), DEFINE_ZMQ_CONST( PUSH ), DEFINE_ZMQ_CONST( XPUB ), DEFINE_ZMQ_CONST( XSUB ), DEFINE_ZMQ_CONST( XREQ ), DEFINE_ZMQ_CONST( XREP ), #ifdef ZMQ_STREAM DEFINE_ZMQ_CONST( STREAM ),