Flex 호출 Socket

1394 단어 socketFlexSecurity
			private function configureListeners():void 
			{
				socket.addEventListener(Event.CLOSE, closeHandler);
				socket.addEventListener(Event.CONNECT, connectHandler);
				socket.addEventListener(ProgressEvent.SOCKET_DATA,dataHandler);
				socket.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
				socket.addEventListener(ProgressEvent.PROGRESS, progressHandler);
				socket.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
			}


		private function closeHandler(event:Event):void {
			//ReceiveStr.text+=" , !
"; } private function connectHandler(event:Event):void { //ReceiveStr.text+=" !
"; } private function dataHandler(event:ProgressEvent):void { //if(socket.bytesAvailable) //{ var intPrice:Number = parseFloat(socket.readMultiByte(socket.bytesAvailable,"utf8").toString()); } private function ioErrorHandler(event:IOErrorEvent):void { //ReceiveStr.text+=event.toString()+"
"; } private function progressHandler(event:ProgressEvent):void { trace("progressHandler loaded:"  + event.bytesLoaded + " total: " + event.bytesTotal); } private function securityErrorHandler(event:SecurityErrorEvent):void { //ReceiveStr.text+=event.toString()+"
"; }

좋은 웹페이지 즐겨찾기