Exemple #1
0
WSLUA_METHOD Listener_remove(lua_State* L) {
    /* Removes a tap listener */
    Listener tap = checkListener(L,1);

    if (!tap) return 0;

    remove_tap_listener(tap);

    return 0;
}
Exemple #2
0
WSLUA_METAMETHOD Listener_tostring(lua_State* L) {
    Listener tap = checkListener(L,1);
    gchar* str;
    
    if (!tap) return 0;
    
    str = ep_strdup_printf("Listener(%s) filter: %s",tap->name, tap->filter ? tap->filter : "NONE");
    lua_pushstring(L,str);
    
    return 1;
}
Exemple #3
0
WSLUA_METAMETHOD Listener__tostring(lua_State* L) {
    /* Generates a string of debug info for the tap listener */
    Listener tap = checkListener(L,1);
    gchar* str;

    if (!tap) return 0;

    str = ep_strdup_printf("Listener(%s) filter: %s",tap->name, tap->filter ? tap->filter : "NONE");
    lua_pushstring(L,str);

    return 1;
}