SendMessage() public méthode

发送SOCKET消息
public SendMessage ( ByteBuffer buffer ) : void
buffer ByteBuffer
Résultat void
Exemple #1
0
    static int SendMessage(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject <LuaFramework.NetworkManager>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                obj.SendMessage(arg0);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes <string, UnityEngine.SendMessageOptions>(L, 2))
            {
                LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject <LuaFramework.NetworkManager>(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                UnityEngine.SendMessageOptions arg1 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 3);
                obj.SendMessage(arg0, arg1);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes <LuaInterface.LuaByteBuffer, int>(L, 2))
            {
                LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject <LuaFramework.NetworkManager>(L, 1);
                LuaByteBuffer arg0 = new LuaByteBuffer(ToLua.CheckByteBuffer(L, 2));
                int           arg1 = (int)LuaDLL.lua_tonumber(L, 3);
                obj.SendMessage(arg0, arg1);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes <string, object>(L, 2))
            {
                LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject <LuaFramework.NetworkManager>(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                object arg1 = ToLua.ToVarObject(L, 3);
                obj.SendMessage(arg0, arg1);
                return(0);
            }
            else if (count == 4)
            {
                LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.CheckObject <LuaFramework.NetworkManager>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                object arg1 = ToLua.ToVarObject(L, 3);
                UnityEngine.SendMessageOptions arg2 = (UnityEngine.SendMessageOptions)ToLua.CheckObject(L, 4, typeof(UnityEngine.SendMessageOptions));
                obj.SendMessage(arg0, arg1, arg2);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: LuaFramework.NetworkManager.SendMessage"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
    static int SendMessage(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(LuaFramework.NetworkManager), typeof(string)))
            {
                LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.ToObject(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                obj.SendMessage(arg0);
                return(0);
            }
            else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(LuaFramework.NetworkManager), typeof(LuaFramework.ByteBuffer)))
            {
                LuaFramework.NetworkManager obj  = (LuaFramework.NetworkManager)ToLua.ToObject(L, 1);
                LuaFramework.ByteBuffer     arg0 = (LuaFramework.ByteBuffer)ToLua.ToObject(L, 2);
                obj.SendMessage(arg0);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(LuaFramework.NetworkManager), typeof(string), typeof(UnityEngine.SendMessageOptions)))
            {
                LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.ToObject(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                UnityEngine.SendMessageOptions arg1 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 3);
                obj.SendMessage(arg0, arg1);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(LuaFramework.NetworkManager), typeof(string), typeof(object)))
            {
                LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.ToObject(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                object arg1 = ToLua.ToVarObject(L, 3);
                obj.SendMessage(arg0, arg1);
                return(0);
            }
            else if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(LuaFramework.NetworkManager), typeof(string), typeof(object), typeof(UnityEngine.SendMessageOptions)))
            {
                LuaFramework.NetworkManager obj = (LuaFramework.NetworkManager)ToLua.ToObject(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                object arg1 = ToLua.ToVarObject(L, 3);
                UnityEngine.SendMessageOptions arg2 = (UnityEngine.SendMessageOptions)ToLua.ToObject(L, 4);
                obj.SendMessage(arg0, arg1, arg2);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: LuaFramework.NetworkManager.SendMessage"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
 static int SendMessage(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         LuaFramework.NetworkManager obj  = (LuaFramework.NetworkManager)ToLua.CheckObject(L, 1, typeof(LuaFramework.NetworkManager));
         LuaFramework.ByteBuffer     arg0 = (LuaFramework.ByteBuffer)ToLua.CheckObject(L, 2, typeof(LuaFramework.ByteBuffer));
         obj.SendMessage(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }