cocos-enhance-kit/assets/js/065b14bc.73909bd8.js

1 line
17 KiB
JavaScript
Raw Normal View History

"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[909],{3905:function(e,t,n){n.d(t,{Zo:function(){return u},kt:function(){return m}});var o=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i=o.createContext({}),s=function(e){var t=o.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},u=function(e){var t=s(e.components);return o.createElement(i.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},d=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,i=e.parentName,u=p(e,["components","mdxType","originalType","parentName"]),d=s(n),m=r,k=d["".concat(i,".").concat(m)]||d[m]||c[m]||a;return n?o.createElement(k,l(l({ref:t},u),{},{components:n})):o.createElement(k,l({ref:t},u))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,l=new Array(a);l[0]=d;var p={};for(var i in t)hasOwnProperty.call(t,i)&&(p[i]=t[i]);p.originalType=e,p.mdxType="string"==typeof e?e:r,l[1]=p;for(var s=2;s<a;s++)l[s]=n[s];return o.createElement.apply(null,l)}return o.createElement.apply(null,n)}d.displayName="MDXCreateElement"},87009:function(e,t,n){n.r(t),n.d(t,{assets:function(){return u},contentTitle:function(){return i},default:function(){return m},frontMatter:function(){return p},metadata:function(){return s},toc:function(){return c}});var o=n(87462),r=n(63366),a=(n(67294),n(3905)),l=["components"],p={sidebar_position:4,description:"\u5728\u591a\u7ebf\u7a0b\u4e2d\u4f7f\u7528 WebSocket\u3002"},i="WebSocket",s={unversionedId:"user-guide/multithread/thread-ws",id:"version-3.0.0/user-guide/multithread/thread-ws",title:"WebSocket",description:"\u5728\u591a\u7ebf\u7a0b\u4e2d\u4f7f\u7528 WebSocket\u3002",source:"@site/versioned_docs/version-3.0.0/user-guide/multithread/thread-ws.md",sourceDirName:"user-guide/multithread",slug:"/user-guide/multithread/thread-ws",permalink:"/cocos-enhance-kit/docs/user-guide/multithread/thread-ws",draft:!1,tags:[],version:"3.0.0",sidebarPosition:4,frontMatter:{sidebar_position:4,description:"\u5728\u591a\u7ebf\u7a0b\u4e2d\u4f7f\u7528 WebSocket\u3002"},sidebar:"tutorialSidebar",previous:{title:"XMLHttpRequest",permalink:"/cocos-enhance-kit/docs/user-guide/multithread/thread-http"},next:{title:"\u81ea\u5b9a\u4e49\u591a\u7ebf\u7a0b\u6269\u5c55",permalink:"/cocos-enhance-kit/docs/user-guide/multithread/thread-custom"}},u={},c=[{value:"\u81ea\u5b9a\u4e49\u6570\u636e\u89e3\u6790",id:"\u81ea\u5b9a\u4e49\u6570\u636e\u89e3\u6790",level:2},{value:"\u89e3\u51b3\u7ec6\u8282\u95ee\u9898",id:"\u89e3\u51b3\u7ec6\u8282\u95ee\u9898",level:2}],d={toc:c};function m(e){var t=e.components,p=(0,r.Z)(e,l);return(0,a.kt)("wrapper",(0,o.Z)({},d,p,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"websocket"},"WebSocket"),(0,a.kt)("p",null,"\u4f9d\u6b21\u70b9\u51fb\u7f16\u8f91\u5668\u7684\u83dc\u5355\u9879 ",(0,a.kt)("strong",{parentName:"p"},"\u9879\u76ee - \u793e\u533a\u7248\u8bbe\u7f6e"),"\uff0c\u7136\u540e\u52fe\u9009 ",(0,a.kt)("strong",{parentName