Пример #1
0
            internal static _OnDisconnect OnDisconnect()
            {
                if (_OnDisconnectFunc == null)
                {
                    _OnDisconnectFunc =
                        (_OnDisconnect)Marshal.GetDelegateForFunctionPointer(
                            Torque3D.DllLoadUtils.GetProcAddress(
                                Torque3D.Torque3DLibHandle,
                                "cbTCPObject_onDisconnect"), typeof(_OnDisconnect));
                }

                return(_OnDisconnectFunc);
            }
Пример #2
0
        public Gateway_Server()
        {
            var port = System.Configuration.ConfigurationManager.AppSettings["RAT_Gateway_Listen_Port"];
            if(string.IsNullOrWhiteSpace(port))
                port = "5939";         
            
            OnConnect_CallBack = OnConnect;
            OnDisconnect_CallBack = OnDisconnect;

            _Server = Create_Server(OnConnect_CallBack, OnDisconnect_CallBack);
            Listen(_Server, "", port);

        }
Пример #3
0
            internal static _OnDisconnect OnDisconnect()
            {
                if (_OnDisconnectFunc == null)
                {
                    _OnDisconnectFunc =
                        (_OnDisconnect)Marshal.GetDelegateForFunctionPointer(
                            NativeLibrary.GetExport(
                                Torque3D.Torque3DLibHandle,
                                "cbTCPObject_onDisconnect"), typeof(_OnDisconnect));
                }

                return(_OnDisconnectFunc);
            }
Пример #4
0
        public Gateway_Server()
        {
            var port = System.Configuration.ConfigurationManager.AppSettings["RAT_Gateway_Listen_Port"];

            if (string.IsNullOrWhiteSpace(port))
            {
                port = "5939";
            }

            OnConnect_CallBack    = OnConnect;
            OnDisconnect_CallBack = OnDisconnect;

            _Server = Create_Server(OnConnect_CallBack, OnDisconnect_CallBack);
            Listen(_Server, "", port);
        }
Пример #5
0
 static extern IntPtr Create_Server(_OnConnect onconnect, _OnDisconnect ondisconnect);
Пример #6
0
 static extern IntPtr Create_Server(_OnConnect onconnect, _OnDisconnect ondisconnect);