1<!DOCTYPE html><html lang="en-US"><head><meta charSet="utf-8"/>
1<script>!function(){try {var d=document.documentElement.classList;d.remove('light','dark');var e=localStorage.getItem('theme');if("system"===e||(!e&&true)){var t="(prefers-color-scheme: dark)",m=window.matchMedia(t);m.media!==t||m.matches?d.add('dark'):d.add('light')}else if(e) d.add(e)}catch(e){}}()</script>
1<title>Open Swoole Documentation and Open Swoole Wiki | Open Swoole PHP</title><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/><meta name="description" content="Documentation of Open Swoole, Open Swoole Wiki, Open Swoole Tutorial"/><meta property="og:description" content="Documentation of Open Swoole, Open Swoole Wiki, Open Swoole Tutorial"/><meta property="og:title" content="Open Swoole Documentation and Open Swoole Wiki | Open Swoole PHP"/><meta property="og:url" content="https://openswoole.com/docs"/><meta property="og:site_name" content="Open Swoole PHP"/><meta property="og:image" content="https://openswoole.com/images/large.png"/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:site" content="@openswoole"/><meta name="twitter:image" content="https://openswoole.com/images/large.png"/><meta name="twitter:title" content="Open Swoole Documentation and Open Swoole Wiki | Open Swoole PHP"/><meta name="twitter:creator" content="@openswoole"/><link rel="canonical" href="https://openswoole.com/docs"/><meta name="monetag" content="1abc974a55d9e07b70b4edb32ce80d1e"/><link rel="preload" href="/fonts/montserrat-v15-latin-regular.woff2" as="font" crossorigin=""/><link rel="apple-touch-icon" sizes="180x180" href="https://openswoole.com/apple-touch-icon.png"/><link rel="icon" type="image/png" sizes="32x32" href="https://openswoole.com/favicon-32x32.png"/><link rel="icon" type="image/png" sizes="16x16" href="https://openswoole.com/favicon-16x16.png"/><link rel="manifest" href="/site.webmanifest"/><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"/><meta name="theme-color" content="#ffffff"/>
1<script src="https://cmp.openswoole.com/v2/cmp.js" data-license="57d3646d38"></script>
1<script async="" src="https://t.pubperf.com/t/b5a635e307.js"></script>
1<script type="text/javascript" id="bssdk-tag" data-bslid="ae064837b63b597d" src="https://pubtm.com/bid/tag.js"></script>
1<script id="adfreepro-tag" data-license="89ad074d06" data-domain="account.adfreepro.com" src="https://tag.adfreepro.com/tag/tag.js" async="" defer=""></script>
1<script id="gendiscover-tag" src="https://tag.gendiscover.com/chat/tag.js?v=1" data-license="a947d45d6b" defer="" async=""></script>
1<meta name="next-head-count" content="29"/><meta content="IE=edge" http-equiv="X-UA-Compatible"/><link rel="preload" href="/_next/static/css/7423aac5c6981500.css" as="style"/><link rel="stylesheet" href="/_next/static/css/7423aac5c6981500.css" data-n-g=""/><noscript data-n-css=""></noscript></head><body class="font-sans" data-prismjs-copy="COPY" data-prismjs-copy-success="COPIED"><div id="__next" data-reactroot=""><div class="w-full min-h-full dark:bg-gray-800 dark:text-white antialiased font-body"><div class="mx-auto max-w-screen-lg text-center" id="main-nav"><div class="relative text-left text-white"><div class="flex md:bg-transparent justify-between items-center px-5 lg:px-0 md:justify-start py-4 dark:bg-gray-800 bg-white"><a href="/" class="flex-shrink-0 flex"><span class="sr-only">Open Swoole PHP</span><img id="logo" class="md:inline-block " width="115" height="auto" src="https://openswoole.com/images/swoole-logo.svg" alt="Open Swoole PHP"/></a><div class="-my-2 flex space-x-3 items-center md:hidden"><div class="flex items-center"><button class="rounded-md p-2.5 inline-flex items-center justify-center hover:bg-gray-100 md:hover:bg-transparent text-gray-400 md:text-gray-600 hover:text-gray-500 md:hover:text-gray-900 md:dark:text-white dark:hover:text-gray-500 md:dark:hover:text-gray-200"><svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" height="20" width="20" xmlns="http://www.w3.org/2000/svg"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg></button></div><button class="rounded-md p-2 inline-flex items-center justify-center focus:outline-none text-gray-400 hover:text-gray-500 hover:bg-gray-100" id="headlessui-popover-button-undefined" type="button" aria-expanded="false"><span class="sr-only">Open menu</span><svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></path></svg></button></div><nav class="hidden md:flex-1 md:flex md:items-center md:justify-end space-x-5 lg:space-x-10"><a href="/" class="text-base font-medium text-gray-600 hover:text-gray-900 dark:text-white dark:hover:text-gray-200">Home</a><a href="/article" class="text-base font-medium text-gray-600 hover:text-gray-900 dark:text-white dark:hover:text-gray-200">News</a><a href="/docs" class="text-base font-medium text-gray-600 hover:text-gray-900 dark:text-white dark:hover:text-gray-200">Docs</a><a href="/community" class="text-base font-medium text-gray-600 hover:text-gray-900 dark:text-white dark:hover:text-gray-200">Community</a><div class="flex space-x-4"><a href="https://github.com/openswoole" target="_self" class="inline-flex items-center space-x-1 text-sm px-5 py-3 font-bold uppercase text-center whitespace-nowrap rounded border leading-none !no-underline border-dark-secondary hover:border-dark-primary !text-secondary hover:!text-primary hover:bg-white border-none !text-base !font-medium !text-gray-600 hover:!text-gray-900 dark:text-white dark:hover:!text-gray-200 dark:hover:!bg-transparent !p-0"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024" class="w-6 h-6" aria-hidden="true" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M511.6 76.3C264.3 76.2 64 276.4 64 523.5 64 718.9 189.3 885 363.8 946c23.5 5.9 19.9-10.8 19.9-22.2v-77.5c-135.7 15.9-141.2-73.9-150.3-88.9C215 726 171.5 718 184.5 703c30.9-15.9 62.4 4 98.9 57.9 26.4 39.1 77.9 32.5 104 26 5.7-23.5 17.9-44.5 34.7-60.8-140.6-25.2-199.2-111-199.2-213 0-49.5 16.3-95 48.3-131.7-20.4-60.5 1.9-112.3 4.9-120 58.1-5.2 118.5 41.6 123.2 45.3 33-8.9 70.7-13.6 112.9-13.6 42.4 0 80.2 4.9 113.5 13.9 11.3-8.6 67.3-48.8 121.3-43.9 2.9 7.7 24.7 58.3 5.5 118 32.4 36.8 48.9 82.7 48.9 132.3 0 102.2-59 188.1-200 212.9a127.5 127.5 0 0 1 38.1 91v112.5c.8 9 0 17.9 15 17.9 177.1-59.7 304.6-227 304.6-424.1 0-247.2-200.4-447.3-447.5-447.3z"></path></svg><span>Github</span></a></div><div class="flex items-center"><button class="rounded-md p-2.5 inline-flex items-center justify-center hover:bg-gray-100 md:hover:bg-transparent text-gray-400 md:text-gray-600 hover:text-gray-500 md:hover:text-gray-900 md:dark:text-white dark:hover:text-gray-500 md:dark:hover:text-gray-200"><svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" height="20" width="20" xmlns="http://www.w3.org/2000/svg"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg></button></div></nav></div></div></div><main class="flex flex-col flex-1 w-full lg:px-0 px-5 py-16 mx-auto max-w-screen-lg bg-white dark:bg-gray-800"><div class="flex flex-col-reverse h-full md:flex-row"><div class="mt-10 md:mt-0 flex-shrink-0 md:w-1/3 md:pr-4 lg:pr-8 xl:pr-12"><section class="flex flex-col space-y-8 mb-8"><div class="bs_top" style="min-height:600px"></div><section class="p-5 border border-gray-200 bg-gray-50 dark:bg-slate-800 dark:border-gray-700 rounded-md"><h3 class="mb-3 text-gray-400 dark:text-slate-200">Community</h3><p class="mb-5">Join 4,000+ others and never miss out on new tips, tutorials, and more.</p><div class="flex gap-2 flex-wrap"><a class="inline-flex space-x-1 items-center py-1.5 px-2 bg-blue-450 text-white transition transform hover:-translate-y-1" href="https://github.com/openswoole" target="_blank" rel="noreferrer"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M511.6 76.3C264.3 76.2 64 276.4 64 523.5 64 718.9 189.3 885 363.8 946c23.5 5.9 19.9-10.8 19.9-22.2v-77.5c-135.7 15.9-141.2-73.9-150.3-88.9C215 726 171.5 718 184.5 703c30.9-15.9 62.4 4 98.9 57.9 26.4 39.1 77.9 32.5 104 26 5.7-23.5 17.9-44.5 34.7-60.8-140.6-25.2-199.2-111-199.2-213 0-49.5 16.3-95 48.3-131.7-20.4-60.5 1.9-112.3 4.9-120 58.1-5.2 118.5 41.6 123.2 45.3 33-8.9 70.7-13.6 112.9-13.6 42.4 0 80.2 4.9 113.5 13.9 11.3-8.6 67.3-48.8 12
11.3-43.9 2.9 7.7 24.7 58.3 5.5 118 32.4 36.8 48.9 82.7 48.9 132.3 0 102.2-59 188.1-200 212.9a127.5 127.5 0 0 1 38.1 91v112.5c.8 9 0 17.9 15 17.9 177.1-59.7 304.6-227 304.6-424.1 0-247.2-200.4-447.3-447.5-447.3z"></path></svg><span>Github</span></a><a class="inline-flex space-x-1 items-center py-1.5 px-2 bg-blue-450 text-white transition transform hover:-translate-y-1" href="https://twitter.com/openswoole" target="_blank" rel="noreferrer"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M928 254.3c-30.6 13.2-63.9 22.7-98.2 26.4a170.1 170.1 0 0 0 75-94 336.64 336.64 0 0 1-108.2 41.2A170.1 170.1 0 0 0 672 174c-94.5 0-170.5 76.6-170.5 170.6 0 13.2 1.6 26.4 4.2 39.1-141.5-7.4-267.7-75-351.6-178.5a169.32 169.32 0 0 0-23.2 86.1c0 59.2 30.1 111.4 76 142.1a172 172 0 0 1-77.1-21.7v2.1c0 82.9 58.6 151.6 136.7 167.4a180.6 180.6 0 0 1-44.9 5.8c-11.1 0-21.6-1.1-32.2-2.6C211 652 273.9 701.1 348.8 702.7c-58.6 45.9-132 72.9-211.7 72.9-14.3 0-27.5-.5-41.2-2.1C171.5 822 261.2 850 357.8 850 671.4 850 843 590.2 843 364.7c0-7.4 0-14.8-.5-22.2 33.2-24.3 62.3-54.4 85.5-88.2z"></path></svg><span>Twitter</span></a><a class="inline-flex space-x-1 items-center py-1.5 px-2 bg-blue-450 text-white transition transform hover:-translate-y-1" href="https://www.getrevue.co/profile/swoole" target="_blank" rel="noreferrer"><span>Newsletter</span></a><a class="inline-flex space-x-1 items-center py-1.5 px-2 bg-blue-450 text-white transition transform hover:-translate-y-1" href="https://goo.gl/forms/wooTTDmhbu30x4qC3" target="_blank" rel="noreferrer"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 448 512" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M446.2 270.4c-6.2-19-26.9-29.1-46-22.9l-45.4 15.1-30.3-90 45.4-15.1c19.1-6.2 29.1-26.8 23-45.9-6.2-19-26.9-29.1-46-22.9l-45.4 15.1-15.7-47c-6.2-19-26.9-29.1-46-22.9-19.1 6.2-29.1 26.8-23 45.9l15.7 47-93.4 31.2-15.7-47c-6.2-19-26.9-29.1-46-22.9-19.1 6.2-29.1 26.8-23 45.9l15.7 47-45.3 15c-19.1 6.2-29.1 26.8-23 45.9 5 14.5 19.1 24 33.6 24.6 6.8 1 12-1.6 57.7-16.8l30.3 90L78 354.8c-19 6.2-29.1 26.9-23 45.9 5 14.5 19.1 24 33.6 24.6 6.8 1 12-1.6 57.7-16.8l15.7 47c5.9 16.9 24.7 29 46 22.9 19.1-6.2 29.1-26.8 23-45.9l-15.7-47 93.6-31.3 15.7 47c5.9 16.9 24.7 29 46 22.9 19.1-6.2 29.1-26.8 23-45.9l-15.7-47 45.4-15.1c19-6 29.1-26.7 22.9-45.7zm-254.1 47.2l-30.3-90.2 93.5-31.3 30.3 90.2-93.5 31.3z"></path></svg><span>Slack</span></a><a class="inline-flex space-x-1 items-center py-1.5 px-2 bg-blue-450 text-white transition transform hover:-translate-y-1" href="https://discord.gg/5QC57RNPpw" target="_blank" rel="noreferrer"><span>Discord</span></a><a class="inline-flex space-x-1 items-center py-1.5 px-2 bg-blue-450 text-white transition transform hover:-translate-y-1" href="/support" target="_blank" rel="noreferrer"><span>Support</span></a></div></section></section><div id="doc-nav"><div class="flex items-stretch shadow-sm rounded text-primary inline-flex my-4"><label class="flex items-center px-3 mb-0 font-medium border-t border-b border-l rounded-l bg-secondary border-secondary whitespace-nowrap text-xs py-1 h-button-sm">Version</label><select id="version-select" class="inline-block pl-3 pr-8 py-0 border rounded shadow-sm bg-primary border-secondary focus-ring h-button-sm text-sm block w-full pl-4 rounded-l-none rounded-r !shadow-none text-xs "><option value="">26.x</option><option value="25.x">25.x</option></select></div><div class="mb-3 -ml-1.5"><button class="flex items-center font-bold text-base mb-1"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" id="arrow-swoole-documentation" class="text-gray-400 font-normal opacity-50 text-xl transform rotate-90" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0V0z"></path><path d="M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"></path></svg>Open Swoole Documentation</button><ul id="swoole-documentation" class=""><li class="block pl-3.5"><a href="/docs/unknown"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">Introduction</div></a></li><li class="block pl-3.5"><a href="/docs/unknown/get-started-swoole"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">Get started with Open Swoole</div></a></li><li class="block pl-3.5"><a href="/docs/unknown/get-started/installation"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">Installation</div></a></li><li class="block pl-3.5"><a href="/docs/unknown/background-knowledge-index"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">
1Background Knowledge</div></a></li><li class="block pl-3.5"><a href="/docs/unknown/common-questions/common-questions-index"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">Common Questions</div></a></li><li class="block pl-3.5"><a href="/docs/unknown/get-started/alias"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">Open Swoole Class Alias</div></a></li><li class="block pl-3.5"><a href="/docs/unknown/swoole-features"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">Open Swoole Features</div></a></li><li class="block pl-3.5"><a href="/docs/unknown/modules/swoole-event-loop"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">Open Swoole Event Loop API</div></a></li><li class="block pl-3.5"><a href="/docs/unknown/modules/swoole-timer"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">Open Swoole Timer</div></a></li><li class="block pl-3.5"><a href="/docs/unknown/protocols"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">Open Swoole Protocols</div></a></li><li class="block pl-3.5"><a href="/docs/unknown/tools"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">Open Swoole Tools</div></a></li></ul></div><div class="mb-3 -ml-1.5"><button class="flex items-center font-bold text-base mb-1"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" id="arrow-server" class="text-gray-400 font-normal opacity-50 text-xl transform rotate-90" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0V0z"></path><path d="M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"></path></svg>Open Swoole Server</button><ul id="server" class=""><li class="block pl-3.5"><a href="/docs/unknown/modules/swoole-server-doc"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">TCP/UDP Server</div></a></li><li class="block pl-3.5"><a href="/docs/unknown/modules/swoole-http-server-doc"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">HTTP Server</div></a></li><li class="block pl-3.5"><a href="/docs/unknown/modules/swoole-websocket-server"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">WebSocket Server</div></a></li><li class="block pl-3.5"><a href="/docs/unknown/modules/swoole-mqtt-server"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">MQTT Server</div></a></li><li class="block pl-3.5"><a href="/docs/unknown/modules/grpc-server"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">GRPC Server</div></a></li></ul></div><div class="mb-3 -ml-1.5"><button class="flex items-center font-bold text-base mb-1"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" id="arrow-php-coroutine" class="text-gray-400 font-normal opacity-50 text-xl transform rotate-90" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0V0z"></path><path d="M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"></path></svg>PHP Coroutine</button><ul id="php-coroutine" class=""><li class="block pl-3.5"><a href="/docs/unknown/modules/swoole-coroutine"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">PHP Coroutine / PHP Fiber</div></a></li><li class="block pl-3.5"><a href="/docs/unknown/modules/swoole-coroutine-system"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">Coroutine System</div></a></li><li class="block pl-3.5"><a href="/docs/unknown/modules/swoole-coroutine-channel"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">Coroutine Channel</div></a></li><li class="block pl-3.5"><a href="/docs/unknown/modules/swoole-coroutine-waitgroup"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">Coroutine WaitGroup</div></a></li><li class="block pl-3.5"><a href="/docs/unknown/modules/swoole-coroutine-run"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">Coroutine Co�un</div></a></li><li class="block pl-3.5"><a href="/docs/unknown/modules/swoole-coroutine-tcp-server"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">Coroutine TCP Server</div></a></li><li class="block pl-3.5"><a href="/docs/unknown/modules/swoole-coroutine-http-server"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">Coroutine HTTP Server</div></a></li><li class="block pl-3.5"><a href="/docs/unknown/modules/swoole-coroutine-library"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">Coroutine Library</div></a></li><li class="block pl-3.5"><a href="/docs/unknown/modules/swoole-runtime-flags"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">Coroutine Hooks</div></a></li></ul></div><div class="mb-3 -ml-1.5"><button class="flex items-center font-bold text-base mb-1"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" id="arrow-coroutine-clients" class="text-gray-400 font-normal opacity-50 text-xl transform rotate-90" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0V0z"></path><path d="M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"></path></svg>Coroutine Clients</button><ul id="coroutine-clients" class=""><li class="block pl-3.5"><a href="/docs/unknown/modules/swoole-coroutine-client"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">Coroutine TCP/UDP Client</div></a></li><li class="block pl-3.5">
1<a href="/docs/unknown/modules/swoole-coroutine-http-client"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">Coroutine HTTP Client</div></a></li><li class="block pl-3.5"><a href="/docs/unknown/modules/swoole-coroutine-http2-client"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">Coroutine HTTP2 Client</div></a></li><li class="block pl-3.5"><a href="/docs/unknown/modules/swoole-coroutine-socket-client"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">Coroutine Socket Client</div></a></li><li class="block pl-3.5"><a href="/docs/unknown/modules/swoole-coroutine-fastcgi-client"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">Coroutine FastCGI Client</div></a></li><li class="block pl-3.5"><a href="/docs/unknown/modules/swoole-coroutine-redis"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">Coroutine Redis Client</div></a></li><li class="block pl-3.5"><a href="/docs/unknown/modules/swoole-coroutine-mysql"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">Coroutine MySQL Client</div></a></li><li class="block pl-3.5"><a href="/docs/unknown/modules/swoole-coroutine-postgres"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">Coroutine Postgres Client</div></a></li></ul></div><div class="mb-3 -ml-1.5"><button class="flex items-center font-bold text-base mb-1"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" id="arrow-multiprocessing" class="text-gray-400 font-normal opacity-50 text-xl transform rotate-90" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0V0z"></path><path d="M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"></path></svg>Multiprocessing</button><ul id="multiprocessing" class=""><li class="block pl-3.5"><a href="/docs/unknown/modules/swoole-multiprocessing"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">Multiprocessing</div></a></li><li class="block pl-3.5"><a href="/docs/unknown/modules/swoole-process"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">Process</div></a></li><li class="block pl-3.5"><a href="/docs/unknown/modules/swoole-process-pool"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">Process Pool</div></a></li><li class="block pl-3.5"><a href="/docs/unknown/modules/swoole-table"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">Table</div></a></li><li class="block pl-3.5"><a href="/docs/unknown/modules/swoole-atomic"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">Atomic</div></a></li><li class="block pl-3.5"><a href="/docs/unknown/modules/swoole-lock"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">Lock</div></a></li></ul></div><div class="mb-3 -ml-1.5"><button class="flex items-center font-bold text-base mb-1"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" id="arrow-swoole-community" class="text-gray-400 font-normal opacity-50 text-xl transform rotate-90" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0V0z"></path><path d="M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"></path></svg>Open Swoole Community</button><ul id="swoole-community" class=""><li class="block pl-3.5"><a href="https://twitter.com/openswoole"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">Twitter</div></a></li><li class="block pl-3.5"><a href="/community"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">Slack Group</div></a></li><li class="block pl-3.5"><a href="/support"><div class="px-1.5 rounded block leading-tight py-2 text-sm text-secondary hover:text-primary hover:bg-secondary">Support</div></a></li></ul></div><div class="flex items-stretch shadow-sm rounded text-primary inline-flex mt-4"><label class="flex items-center px-3 mb-0 font-medium border-t border-b border-l rounded-l bg-secondary border-secondary whitespace-nowrap text-xs py-1 h-button-sm">Theme</label><select id="theme-select" class="inline-block pl-3 pr-8 py-0 border rounded shadow-sm bg-primary border-secondary focus-ring h-button-sm text-sm block w-full pl-4 rounded-l-none rounded-r !shadow-none text-xs "><option value="light">Light</option><option value="dark">Dark</option><option value="system">System</option></select></div></div></div><div class="flex-1 relative min-w-0"><div class="mb-6"><nav class="flex" aria-label="Breadcrumb"><ol itemscope="" itemType="https://schema.org/BreadcrumbList" class="flex items-center space-x-4"><li itemscope="" itemProp="itemListElement" itemType="https://schema.org/ListItem"><div><a itemProp="item" href="/" class="text-gray-400 hover:text-gray-500"><span itemProp="name">Home</span></a></div><meta itemProp="position" content="1"/></li><li itemscope="" itemProp="itemListElement" itemType="https://schema.org/ListItem"><div class="flex items-center"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="flex-shrink-0 h-5 w-5 text-gray-400"><path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd"></path></svg><span itemProp="name" class="ml-4 text-sm font-medium text-gray-500 hover:text-gray-600">Docs</span></div><meta itemProp="position" content="2"/></li></ol></nav></div><div class="mdx-content"><div class="mb-4"><h1 class="mb-4 text-4xl font-semibold">Open Swoole Documentation and Open Swoole Wiki</h1><blockquote class="swoole-version"><p>Latest version: <code>pecl install openswoole-26.2.0 | composer require openswoole/core:2
16.2.0</code></p></blockquote></div><div><h3 class="!text-primary font-semibold group text-lg mb-4 mt-6" id="what-is-open-swoole?"><a class="relative block !text-primary !no-underline flex items-center" href="#what-is-open-swoole?"><svg xmlns="http://www.w3.org/2000/svg" class="invisible group-hover:visible" style="width:1em;height:1em;margin-left:-1em" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M7 20l4-16m2 16l4-16M6 9h14M4 15h14"></path></svg>What is Open Swoole?</a></h3><p>Open Swoole is a high-performance network framework based on an event-driven, asynchronous, non-blocking I/O coroutine programming model for PHP.</p><p>Designed for building large scale concurrency systems. It is written in C/C++ and installed as a PHP extension. Enabling PHP developers to write code in a more efficient manner, taking advantage of event-loops and fibers/coroutines.</p><p>Providing you with an easy to use coroutine API and allowing you to use existing libraries within the PHP ecosystem.</p><h3 class="!text-primary font-semibold group text-lg mb-4 mt-6" id="what-can-i-do-with-open-swoole?"><a class="relative block !text-primary !no-underline flex items-center" href="#what-can-i-do-with-open-swoole?"><svg xmlns="http://www.w3.org/2000/svg" class="invisible group-hover:visible" style="width:1em;height:1em;margin-left:-1em" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M7 20l4-16m2 16l4-16M6 9h14M4 15h14"></path></svg>What can I do with Open Swoole?</a></h3><p>PHP developers can use Open Swoole to write high-performance, scalable, concurrent TCP, UDP, Unix Socket, HTTP, WebSocket, FastCGI services with PHP syntax. You Don't have to be an expert on non-blocking I/O programming and low-level Linux kernel development to take advantage of what Open Swoole offers.</p><p>Compared with other Async programming frameworks or software such as Nginx, Tornado, Node.js, Open Swoole is a complete PHP Async solution that has built-in support for async programming via coroutines, a range of multi-threaded I/O modules (HTTP Server, WebSockets, TaskWorkers, Process Pools) and support for popular PHP clients like PDO for MySQL, Redis and CURL.</p><p>With the power and performance Open Swoole brings you can write scalable PHP applications for web servers, API backends, game servers, chat systems, CMS platforms, micro-services and realtime web services etc.</p><h3 class="!text-primary font-semibold group text-lg mb-4 mt-6" id="what-are-the-differences?"><a class="relative block !text-primary !no-underline flex items-center" href="#what-are-the-differences?"><svg xmlns="http://www.w3.org/2000/svg" class="invisible group-hover:visible" style="width:1em;height:1em;margin-left:-1em" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M7 20l4-16m2 16l4-16M6 9h14M4 15h14"></path></svg>What are the differences?</a></h3><p>Developers can wite PHP code using a Synchronous or Asynchronous programming model and not have to rely on callback hell because of how Open Swoole achieves concurrency with coroutines, a much easier way to write Asynchronous code in a Synchronous style.</p><p>Open Swoole enhances the efficiency of your PHP applications and brings you out of the traditional stateless model, enabling you to focus on the development of innovative products at high scale, brining event loops and asynchronous programming to the PHP language.</p><p>Open Swoole follows similar asynchronous principles from <a href="https://www.erlang.org/">Erlang</a>, <a href="https://nodejs.org/en/">Node.js</a> and <a href="https://netty.io/">Netty</a>, but for PHP.</p><p>The Open Swoole framework is released as a PHP extension (PECL) and runs as a PHP CLI application, you can either run a Open Swoole HTTP server directly on your network or use Apache or Nginx and a proxy pass through to your Open Swoole enabled application.</p><h3 class="!text-primary font-semibold group text-lg mb-4 mt-6" id="openswoole-components"><a class="relative block !text-primary !no-underline flex items-center" href="#openswoole-components"><svg xmlns="http://www.w3.org/2000/svg" class="invisible group-hover:visible" style="width:1em;height:1em;margin-left:-1em" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M7 20l4-16m2 16l4-16M6 9h14M4 15h14"></path></svg>OpenSwoole Components</a></h3><ul><li><a href="https://github.com/openswoole/ext-openswoole">OpenSwoole Extension</a></li><li><a href="/docs/core">OpenSwoole Core</a></li><li><a href="/docs/psr">OpenSwoole Psr</a> (Provided within OpenSwoole Core)</li><li><a href="https://github.com/openswoole/grpc">OpenSwoole GRPC</a></li><li><a href="https://github.com/openswoole/ide-helper">
1OpenSwoole IDE Helper</a></li><li><a href="/dashboard">OpenSwoole Dashboard</a></li></ul><h3 class="!text-primary font-semibold group text-lg mb-4 mt-6" id="hello-world"><a class="relative block !text-primary !no-underline flex items-center" href="#hello-world"><svg xmlns="http://www.w3.org/2000/svg" class="invisible group-hover:visible" style="width:1em;height:1em;margin-left:-1em" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M7 20l4-16m2 16l4-16M6 9h14M4 15h14"></path></svg>Hello world</a></h3><pre><code class="language-php"><?php 2use OpenSwoole\Http\Server; 3use OpenSwoole\Http\Request; 4use OpenSwoole\Http\Response; 5 6$server = new OpenSwoole\HTTP\Server("127.0.0.1", 9501); 7 8$server->on("start", function (Server $server) { 9 echo "OpenSwoole http server is started at http://127.0.0.1:9501\n"; 10}); 11 12$server->on("request", function (Request $request, Response $response) { 13 $response->header("Content-Type", "text/plain"); 14 $response->end("Hello World\n"); 15}); 16 17$server->start(); 18</code></pre><p>Interested with Open Swoole? <a href="/docs/swoole-get-started">Get Started with Open Swoole</a> now!</p><p>You can also check the <a href="/docs/swoole-error-code">Open Swoole Error Codes</a>.</p><h3 class="!text-primary font-semibold group text-lg mb-4 mt-6" id="documentation"><a class="relative block !text-primary !no-underline flex items-center" href="#documentation"><svg xmlns="http://www.w3.org/2000/svg" class="invisible group-hover:visible" style="width:1em;height:1em;margin-left:-1em" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M7 20l4-16m2 16l4-16M6 9h14M4 15h14"></path></svg>Documentation</a></h3><ul><li><a href="/docs/">Introduction</a></li><li><a href="/docs/get-started-swoole">Get started with OpenSwoole</a></li><li><a href="/docs/get-started/installation">Installation</a></li><li><a href="/docs/background-knowledge-index">Background Knowledge</a></li><li><a href="/docs/common-questions-index">Common Questions</a></li></ul><h5 class="!text-primary font-semibold group text-base mb-2 mt-4" id="open-swoole-components"><a class="relative block !text-primary !no-underline flex items-center" href="#open-swoole-components"><svg xmlns="http://www.w3.org/2000/svg" class="invisible group-hover:visible" style="width:1em;height:1em;margin-left:-1em" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M7 20l4-16m2 16l4-16M6 9h14M4 15h14"></path></svg>Open Swoole Components</a></h5><ul><li><a href="https://github.com/openswoole/ext-openswoole">OpenSwoole Extension</a></li><li><a href="/docs/core">OpenSwoole Core</a></li><li><a href="/docs/psr">OpenSwoole PSR</a></li><li><a href="/docs/grpc">OpenSwoole GRPC</a></li><li><a href="/dashboard">OpenSwoole Dashboard</a></li><li><a href="https://github.com/openswoole/ide-helper">OpenSwoole IDE Helper</a></li></ul><h5 class="!text-primary font-semibold group text-base mb-2 mt-4" id="open-swoole-server"><a class="relative block !text-primary !no-underline flex items-center" href="#open-swoole-server"><svg xmlns="http://www.w3.org/2000/svg" class="invisible group-hover:visible" style="width:1em;height:1em;margin-left:-1em" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M7 20l4-16m2 16l4-16M6 9h14M4 15h14"></path></svg>Open Swoole Server</a></h5><ul><li><a href="/docs/modules/swoole-server-doc">TCP/UDP Server</a></li><li><a href="/docs/modules/swoole-http-server-doc">HTTP Server</a></li><li><a href="/docs/modules/swoole-websocket-server">WebSocket Server</a></li><li><a href="/docs/modules/swoole-mqtt-server">MQTT Server</a></li><li><a href="/docs/grpc/server">GRPC Server</a></li></ul><h5 class="!text-primary font-semibold group text-base mb-2 mt-4" id="php-coroutine"><a class="relative block !text-primary !no-underline flex items-center" href="#php-coroutine"><svg xmlns="http://www.w3.org/2000/svg" class="invisible group-hover:visible" style="width:1em;height:1em;margin-left:-1em" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M7 20l4-16m2 16l4-16M6 9h14M4 15h14"></path></svg>PHP Coroutine</a></h5><ul><li><a href="/docs/modules/swoole-coroutine">PHP Coroutine / PHP Fiber</a></li><li><a href="/docs/modules/swoole-runtime-flags">Coroutine Hooks</a></li><li><a href="/docs/modules/swoole-coroutine-system">Coroutine System</a></li><li><a href="/docs/modules/swoole-coroutine-channel">Coroutine Channel</a></li><li><a href="/docs/modules/swoole-coroutine-waitgroup">Coroutine WaitGroup</a></li><li><a href="/docs/modules/swoole-coroutine-run">Coroutine Context</a></li><li><a href="/docs/modules/swoole-coroutine-server">Coroutine TCP Server</a></li></ul><h5 class="!text-primary font-semibold group text-base mb-2 mt-4" id="coroutine-clients"><a class="relative block !text-primary !no-underline flex items-center" href="#coroutine-clients"><svg xmlns="http://www.w3.org/2000/svg" class="invisible group-hover:visible" style="width:1em;height:1em;margin-left:-1em" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M7 20l4-16m2 16l4-16M6 9h14M4 15h14"></path></svg>Coroutine Clients</a></h5><ul><li><a href="/docs/modules/swoole-coroutine-client">Coroutine TCP/UDP Client</a></li><li>
18<a href="/docs/modules/swoole-coroutine-http-client">Coroutine HTTP Client</a></li><li><a href="/docs/modules/swoole-coroutine-http2-client">Coroutine HTTP2 Client</a></li><li><a href="/docs/modules/swoole-coroutine-postgres">Coroutine Postgres Client</a></li><li><a href="/docs/grpc/client">Coroutine GRPC Client</a></li></ul><h5 class="!text-primary font-semibold group text-base mb-2 mt-4" id="multiprocessing"><a class="relative block !text-primary !no-underline flex items-center" href="#multiprocessing"><svg xmlns="http://www.w3.org/2000/svg" class="invisible group-hover:visible" style="width:1em;height:1em;margin-left:-1em" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M7 20l4-16m2 16l4-16M6 9h14M4 15h14"></path></svg>Multiprocessing</a></h5><ul><li><a href="/docs/modules/swoole-multiprocessing">Multiprocessing</a></li><li><a href="/docs/modules/swoole-process">Process</a></li><li><a href="/docs/modules/swoole-process-pool">Process Pool</a></li><li><a href="/docs/modules/swoole-process-manager">Process Manager</a></li><li><a href="/docs/modules/swoole-table">OpenSwoole Table</a></li><li><a href="/docs/modules/swoole-atomic">OpenSwoole Atomic</a></li><li><a href="/docs/modules/swoole-lock">OpenSwoole Lock</a></li></ul><p>Have more questions or need support? - Checkout the <a href="/community">community</a> page or the Open Swoole <a href="/docs/get-started-swoole">Quick Start</a> guide. We even have a <a href="/support">Support Service</a> as well.</p></div></div><div class="flex flex-col sm:flex-row sm:items-center justify-between py-4 mt-4 border-b"><div class="text-secondary mb-1 sm:mb-0">Last updated on<!-- --> <!-- -->February<!-- --> <!-- -->9<!-- -->, <!-- -->2023</div></div><div class="mt-4"><section class="dark:bg-slate-800 dark:border-gray-700 rounded-md"><div class="flex gap-2 flex-wrap"><a class="inline-flex space-x-1 items-center py-1.5 px-2 bg-blue-450 text-white transition transform hover:-translate-y-1" href="https://github.com/openswoole/openswoole/issues" target="_blank" rel="noreferrer"><span>â at Github</span></a><a class="inline-flex space-x-1 items-center py-1.5 px-2 bg-blue-450 text-white transition transform hover:-translate-y-1" href="https://twitter.com/openswoole" target="_blank" rel="noreferrer"><span>Follow Twitter</span></a><a class="inline-flex space-x-1 items-center py-1.5 px-2 bg-blue-450 text-white transition transform hover:-translate-y-1" href="https://www.getrevue.co/profile/swoole" target="_blank" rel="noreferrer"><span>Subscribe Newsletter</span></a><a class="inline-flex space-x-1 items-center py-1.5 px-2 bg-blue-450 text-white transition transform hover:-translate-y-1" href="https://goo.gl/forms/wooTTDmhbu30x4qC3" target="_blank" rel="noreferrer"><span>Join Slack</span></a><a class="inline-flex space-x-1 items-center py-1.5 px-2 bg-blue-450 text-white transition transform hover:-translate-y-1" href="https://discord.gg/5QC57RNPpw" target="_blank" rel="noreferrer"><span>Join Discord</span></a></div></section></div></div></div></main></div><footer class="bg-gray-700 dark:bg-gray-900 text-white p-10 font-sans"><div class="mx-auto max-w-screen-lg md:flex"><div class="pb-8 text-base"><div class="grid grid-cols-1 md:!grid-cols-2 gap-8 text-center md:text-left"><div class="grid grid-cols-1 md:!grid-cols-2 gap-8"><div><h4 class="text-white tracking-wider uppercase">Open Swoole</h4><p class="mt-4">Open Swoole is an open source production ready high performance coroutine fiber async solution for PHP, previously named Swoole.</p></div><div><h4 class="text-white tracking-wider uppercase">Quick Links</h4><ul class="mt-4 space-y-1"><li><a href="https://openswoole.com/how-it-works" class="text-gray-400 hover:text-gray-200">How it works</a></li><li><a href="https://openswoole.com/docs" class="text-gray-400 hover:text-gray-200">Get Started</a></li><li><a href="https://openswoole.com/php-framework" title="Open Swoole Frameworks" class="text-gray-400 hover:text-gray-200">Open Swoole Frameworks</a></li><li><a href="/supported-versions" title="Open Swoole versions" class="text-gray-400 hover:text-gray-200">Supported Versions</a></li><li><a href="https://swoolebook.com" title="Open Swoole Book" class="text-gray-400 hover:text-gray-200">Open Swoole Book</a></li><li><a href="https://openswoole.com/examples" title="Open Swoole Examples" class="text-gray-400 hover:text-gray-200">Open Swoole Examples</a></li><li><a href="https://github.com/openswoole" class="text-gray-400 hover:text-gray-200">Open Swoole Github</a></li><li><a href="https://openswoole.com/swoole-trademark" title="Swoole Trademark" class="text-gray-400 hover:text-gray-200">Trademark Policy</a></li></ul></div></div><div class="space-y-4"><p>Copyright © 2017 - 2026, Transfon Ltd, all rights reserved.<!-- --> </p><p>Swoole® and OpenSwoole⢠are trademarks of<!-- --> <!-- -->Transfon Ltd, all rights reserved.</p><p>Contact Us: <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="3c54595050537c534c59524f4b53535059125f5351">[email protected]</a></p><div id="consent-setting-button"><button class="text-gray-400 hover:text-gray-200">Consent Settings</button></div></div></div></div></div></footer></div><link rel="stylesheet" href="/dist/bundle.3e9df1ab.css"/>
vendor: 108 bytes, line 18
18<script data-cfasync="false" src="/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js"></script>
18<script> 19 window.__state = {"mainNav":{"siteName":"Open Swoole PHP","variant":"white","logoThemeImg":{"dark":"https://openswoole.com/images/swoole-logo-white.svg","light":"https://openswoole.com/images/swoole-logo.svg"},"logoImg":"https://openswoole.com/images/swoole-logo.svg","logoWidth":115,"logoHeight":56,"logoMobileImg":"https://openswoole.com/images/swoole-logo.svg","logoMobileWidth":115,"logoMobileHeight":56,"logoCls":"","mobileBlog":"","menu":[{"name":"Home","href":"/"},{"name":"News","href":"/article"},{"name":"Docs","href":"/docs"},{"name":"Community","href":"/community"}],"mobileMenu":[{"name":"Home","href":"/"},{"name":"News","href":"/article"},{"name":"Docs","href":"/docs"},{"name":"Community","href":"/community"},{"name":"Github","href":"https://github.com/openswoole","icon":"AiFillGithub","cls":"!space-x-1","iconCls":"!w-6 !h-6 !bg-transparent !text-gray-900"}],"loginHref":"","showLoginBtn":false,"contactLink":null,"rightLinks":[{"variant":"white","text":"Github","href":"https://github.com/openswoole","icon":"AiFillGithub","className":"border-none !text-base !font-medium !text-gray-600 hover:!text-gray-900 dark:text-white dark:hover:!text-gray-200 dark:hover:!bg-transparent !p-0"}],"bottomMobileLinks":[]},"docNav":{"meta":{"order":[{"id":"swoole-documentation","name":"Open Swoole Documentation","image":"/img/docs/img.png","open":true,"pages":[{"route":"","path":"index","display":"Introduction","href":"/docs","open":false},{"route":"get-started-swoole","display":"Get started with Open Swoole","href":"/docs/get-started-swoole","open":false},{"route":"get-started/installation","display":"Installation","href":"/docs/get-started/installation","open":false},{"route":"background-knowledge-index","path":"background-knowledge/background-knowledge-index","display":"Background Knowledge","href":"/docs/background-knowledge-index","open":false},{"route":"common-questions/common-questions-index","display":"Common Questions","href":"/docs/common-questions-index","open":false},{"route":"get-started/alias","display":"Open Swoole Class Alias","href":"/docs/get-started/alias","open":false},{"route":"swoole-features","display":"Open Swoole Features","href":"/docs/swoole-features","open":false},{"route":"modules/swoole-event-loop","display":"Open Swoole Event Loop API","href":"/docs/modules/swoole-event-loop","open":false},{"route":"modules/swoole-timer","display":"Open Swoole Timer","href":"/docs/modules/swoole-timer","open":false},{"route":"protocols","display":"Open Swoole Protocols","href":"/protocols","open":false},{"route":"tools","display":"Open Swoole Tools","href":"/tools","open":false}]},{"id":"server","name":"Open Swoole Server","image":"/img/docs/img.png","open":true,"pages":[{"route":"modules/swoole-server-doc","display":"TCP/UDP Server","href":"/docs/modules/swoole-server-doc","open":false},{"route":"modules/swoole-http-server-doc","path":"modules/swoole-http/swoole-http-server-doc","display":"HTTP Server","href":"/docs/modules/swoole-http-server-doc","open":false},{"route":"modules/swoole-websocket-server","path":"modules/swoole-websocket-server/swoole-websocket-server","display":"WebSocket Server","href":"/docs/modules/swoole-websocket-server","open":false},{"route":"modules/swoole-mqtt-server","display":"MQTT Server","href":"/docs/modules/swoole-mqtt-server","open":false},{"route":"modules/grpc-server","display":"GRPC Server","href":"/docs/modules/grpc-server","open":false}]},{"id":"php-coroutine","name":"PHP Coroutine","image":"/img/docs/img.png","open":true,"pages":[{"route":"modules/swoole-coroutine","display":"PHP Coroutine / PHP Fiber","href":"/docs/modules/swoole-coroutine","open":false},{"route":"modules/swoole-coroutine-system","path":"modules/swoole-coroutine-system/swoole-coroutine-system","display":"Coroutine System","href":"/docs/modules/swoole-coroutine-system","open":false},{"route":"modules/swoole-coroutine-channel","display":"Coroutine Channel","href":"/docs/modules/swoole-coroutine-channel","open":false},{"route":"modules/swoole-coroutine-waitgroup","display":"Coroutine WaitGroup","href":"/docs/modules/swoole-coroutine-waitgroup","open":false},{"route":"modules/swoole-coroutine-run","display":"Coroutine Co\run","href":"/docs/modules/swoole-coroutine-run","open":false},{"route":"modules/swoole-coroutine-tcp-server","path":"modules/swoole-coroutine-tcp-server/swoole-coroutine-tcp-server","display":"Coroutine TCP Server","href":"/docs/modules/swoole-coroutine-server","open":false},{"route":"modules/swoole-coroutine-http-server","path":"modules/swoole-coroutine-http-server/swoole-coroutine-http-server","display":"Coroutine HTTP Server","href":"/docs/modules/swoole-coroutine-http-server","open":false},{"route":"modules/swoole-coroutine-library","display":"Coroutine Library","href":"/docs/modules/swoole-coroutine-library","open":false},{"route":"modules/swoole-runtime-flags","path":"runtime-hooks/swoole-runtime-flags","display":"Coroutine Hooks","href":"/docs/modules/swoole-runtime-flags","open":false}]},{"id":"coroutine-clients","name":"Coroutine Clients","image":"/img/docs/img.png","open":true,"pages":[{"route":"modules/swoole-coroutine-client","path":"modules/swoole-coroutine-client/swoole-coroutine-client","display":"Coroutine TCP/UDP Client","href":"/docs/modules/swoole-coroutine-client","open":false}
19,{"route":"modules/swoole-coroutine-http-client","path":"modules/swoole-coroutine-http-client/swoole-coroutine-http-client","display":"Coroutine HTTP Client","href":"/docs/modules/swoole-coroutine-http-client","open":false},{"route":"modules/swoole-coroutine-http2-client","path":"modules/swoole-coroutine-http2-client/swoole-coroutine-http2-client","display":"Coroutine HTTP2 Client","href":"/docs/modules/swoole-coroutine-http2-client","open":false},{"route":"modules/swoole-coroutine-socket-client","path":"modules/swoole-coroutine-socket/swoole-coroutine-socket-client","display":"Coroutine Socket Client","href":"/docs/modules/swoole-coroutine-socket-client","open":false},{"route":"modules/swoole-coroutine-fastcgi-client","path":"modules/swoole-coroutine-fastcgi-client/swoole-coroutine-fastcgi-client","display":"Coroutine FastCGI Client","href":"/docs/modules/swoole-coroutine-fastcgi-client","open":false},{"route":"modules/swoole-coroutine-redis","display":"Coroutine Redis Client","href":"/docs/modules/swoole-coroutine-redis","open":false},{"route":"modules/swoole-coroutine-mysql","display":"Coroutine MySQL Client","href":"/docs/modules/swoole-coroutine-mysql","open":false},{"route":"modules/swoole-coroutine-postgres","path":"modules/swoole-coroutine-postgres/swoole-coroutine-postgres","display":"Coroutine Postgres Client","href":"/docs/modules/swoole-coroutine-postgres","open":false}]},{"id":"multiprocessing","name":"Multiprocessing","image":"/img/docs/img.png","open":true,"pages":[{"route":"modules/swoole-multiprocessing","display":"Multiprocessing","href":"/docs/modules/swoole-multiprocessing","open":false},{"route":"modules/swoole-process","display":"Process","href":"/docs/modules/swoole-process","open":false},{"route":"modules/swoole-process-pool","display":"Process Pool","href":"/docs/modules/swoole-process-pool","open":false},{"route":"modules/swoole-table","display":"Table","href":"/docs/modules/swoole-table","open":false},{"route":"modules/swoole-atomic","display":"Atomic","href":"/docs/modules/swoole-atomic","open":false},{"route":"modules/swoole-lock","display":"Lock","href":"/docs/modules/swoole-lock","open":false}]},{"id":"swoole-community","name":"Open Swoole Community","image":"/img/docs/img.png","open":true,"no_doc":true,"no_version":true,"pages":[{"route":"twitter","display":"Twitter","href":"https://twitter.com/openswoole","open":false},{"route":"community","display":"Slack Group","href":"/community","open":false},{"route":"support","display":"Support","href":"/support","open":false}]}],"version":"pecl install openswoole-26.2.0 | composer require openswoole/core:26.2.0","versions":[{"label":"26.x","value":""},{"label":"25.x","value":"25.x"}]}},"search":{"appId":"TO3FYXQNGE","apiKey":"1826c8622119d2ca7fd9deeafeb181a3","indexName":"openswoole-web"}}; 20 </script>
20<script defer="" src="/dist/vendor.js?v=22090901"></script>
20<script defer="" src="/dist/bundle.3e9df1ab.js"></script>
20<script defer="" src="/dist/openswoole.6c091292.js"></script>
vendor: 66 bytes, line 20
20<script async="" src="https://www.googletagmanager.com/gtag/js?id=
20G-YYNVJ98B8T
vendor: 11 bytes, line 20
20"></script>
20<script> 21
vendor: 134 bytes, lines 21-25
21window.dataLayer = window.dataLayer || []; 22 function gtag(){dataLayer.push(arguments);} 23 gtag('js', new Date()); 24 25 gtag('config', '
25G-YYNVJ98B8T
vendor: 10 bytes, lines 25-26
25'); 26
26</script>
26<script src="//instant.page/5.1.0" type="module" integrity="sha384-by67kQnR+pyfy8yWP4kPO12fHKRLHZPfEsiSXR8u2IKcTdxD805MGUXBzVPnkLHw"></script>
26<script defer="" src="https://static.cloudflareinsights.com/beacon.min.js" data-cf-beacon="{"token": "b34a0cb3b6434296b5f5ba1db96ed7a5"}"></script>
26</body></html>
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.