| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -8,14 +8,28 @@ using UnityEngine; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					using QFrameworkCP; | 
					 | 
					 | 
					 | 
					using QFrameworkCP; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					namespace JXSoft { | 
					 | 
					 | 
					 | 
					namespace JXSoft { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    public class HttpServerView : MonoBehaviour | 
					 | 
					 | 
					 | 
					    public class HttpServerArchitecture : Architecture<HttpServerArchitecture> | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        protected override void Init() | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            this.RegisterUtility(new HttpServerUtility()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            this.RegisterModel(new HttpServerModel()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    public class HttpServerView : MonoBehaviour,IController | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    { | 
					 | 
					 | 
					 | 
					    { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        public string[] prefixes; | 
					 | 
					 | 
					 | 
					        public string[] prefixes; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        public HttpServerUtility httpServer = new HttpServerUtility(); | 
					 | 
					 | 
					 | 
					        public HttpServerUtility httpServer; | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        // Start is called before the first frame update | 
					 | 
					 | 
					 | 
					        // Start is called before the first frame update | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        void Start() | 
					 | 
					 | 
					 | 
					        void Start() | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        { | 
					 | 
					 | 
					 | 
					        { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            //httpServer.startServer(prefixes); | 
					 | 
					 | 
					 | 
					            this.httpServer = this.GetUtility<HttpServerUtility>(); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            this.RegisterEvent<ResponseMsgEvent>(e => { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                if (e.res.GetType() == typeof(BluetoothGateway)) {  | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                    // | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            }).UnRegisterWhenGameObjectDestroyed(gameObject); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            this.GetModel<HttpServerModel>().onReceive<BluetoothGateway>(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        } | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        // Update is called once per frame | 
					 | 
					 | 
					 | 
					        // Update is called once per frame | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -27,7 +41,7 @@ namespace JXSoft { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                item.GetComponentInChildren<Text>().text = tcpUtil.receivedData; | 
					 | 
					 | 
					 | 
					                item.GetComponentInChildren<Text>().text = tcpUtil.receivedData; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                this.GetModel<TCPClientModel>().onDataRecived.Invoke(tcpUtil.receivedData); | 
					 | 
					 | 
					 | 
					                this.GetModel<TCPClientModel>().onDataRecived.Invoke(tcpUtil.receivedData); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                */ | 
					 | 
					 | 
					 | 
					                */ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                Debug.Log(httpServer.receivedData); | 
					 | 
					 | 
					 | 
					                this.GetModel<HttpServerModel>().onDataRecived.Invoke(httpServer.receivedData); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            } | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        } | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        public void startServer() { | 
					 | 
					 | 
					 | 
					        public void startServer() { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -38,6 +52,11 @@ namespace JXSoft { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        { | 
					 | 
					 | 
					 | 
					        { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            httpServer.closeServer(); | 
					 | 
					 | 
					 | 
					            httpServer.closeServer(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        } | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        public IArchitecture GetArchitecture() | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            return HttpServerArchitecture.Interface; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    } | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					} | 
					 | 
					 | 
					 | 
					} | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
					 | 
					 | 
					
  |