Exemple #1
0
    static int set_OnIncompleteFrame(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BestHTTP.WebSocket.WebSocket obj = (BestHTTP.WebSocket.WebSocket)o;
            BestHTTP.WebSocket.OnWebSocketIncompleteFrameDelegate arg0 = null;
            LuaTypes funcType2 = LuaDLL.lua_type(L, 2);

            if (funcType2 != LuaTypes.LUA_TFUNCTION)
            {
                arg0 = (BestHTTP.WebSocket.OnWebSocketIncompleteFrameDelegate)ToLua.CheckObject(L, 2, typeof(BestHTTP.WebSocket.OnWebSocketIncompleteFrameDelegate));
            }
            else
            {
                LuaFunction func = ToLua.ToLuaFunction(L, 2);
                arg0 = DelegateFactory.CreateDelegate(typeof(BestHTTP.WebSocket.OnWebSocketIncompleteFrameDelegate), func) as BestHTTP.WebSocket.OnWebSocketIncompleteFrameDelegate;
            }

            obj.OnIncompleteFrame = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index OnIncompleteFrame on a nil value" : e.Message));
        }
    }
Exemple #2
0
    static int get_OnIncompleteFrame(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BestHTTP.WebSocket.WebSocket obj = (BestHTTP.WebSocket.WebSocket)o;
            BestHTTP.WebSocket.OnWebSocketIncompleteFrameDelegate ret = obj.OnIncompleteFrame;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index OnIncompleteFrame on a nil value" : e.Message));
        }
    }
    static int set_OnIncompleteFrame(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BestHTTP.WebSocket.WebSocket obj = (BestHTTP.WebSocket.WebSocket)o;
            BestHTTP.WebSocket.OnWebSocketIncompleteFrameDelegate arg0 = (BestHTTP.WebSocket.OnWebSocketIncompleteFrameDelegate)ToLua.CheckDelegate <BestHTTP.WebSocket.OnWebSocketIncompleteFrameDelegate>(L, 2);
            obj.OnIncompleteFrame = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index OnIncompleteFrame on a nil value"));
        }
    }