Open Swoole Documentation and Open Swoole Wiki | Open Swoole PHP


本站和网页 https://www.swoole.co.uk/docs/ 的作者无关,不对其内容负责。快照谨为网络故障时之索引,不代表被搜索网站的即时页面。

Open Swoole Documentation and Open Swoole Wiki | Open Swoole PHPOpen Swoole PHPOpen menuHomeNewsDocsCommunitySwoole LabsGithubCommunityJoin 4,000+ others and never miss out on new tips, tutorials, and more.GithubTwitterNewsletterSlackDiscordSupportVersion22.x4.xOpen Swoole DocumentationIntroductionGet started with Open SwooleInstallationBackground KnowledgeCommon QuestionsOpen Swoole Class AliasOpen Swoole FeaturesOpen Swoole Event Loop APIOpen Swoole TimerOpen Swoole ProtocolsOpen Swoole ToolsOpen Swoole ServerTCP/UDP ServerHTTP ServerWebSocket ServerMQTT ServerGRPC ServerPHP CoroutinePHP Coroutine / PHP FiberCoroutine SystemCoroutine ChannelCoroutine WaitGroupCoroutine CounCoroutine TCP ServerCoroutine HTTP ServerCoroutine LibraryCoroutine HooksCoroutine ClientsCoroutine TCP/UDP ClientCoroutine HTTP ClientCoroutine HTTP2 ClientCoroutine Socket ClientCoroutine FastCGI ClientCoroutine Redis ClientCoroutine MySQL ClientCoroutine Postgres ClientMultiprocessingMultiprocessingProcessProcess PoolTableAtomicLockOpen Swoole CommunityTwitterSlack GroupSupportThemeLightDarkSystemHomeDocsOpen Swoole Documentation and Open Swoole WikiLatest version: pecl install openswoole-22.0.0What is Open Swoole?Open Swoole is a high-performance network framework based on an event-driven, asynchronous, non-blocking I/O coroutine programming model for PHP.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.Providing you with an easy to use coroutine API and allowing you to use existing libraries within the PHP ecosystem.What can I do with Open Swoole?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.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.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.What are the differences?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.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.Open Swoole follows similar asynchronous principles from Erlang, Node.js and Netty, but for PHP.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.OpenSwoole ComponentsOpenSwoole ExtensionOpenSwoole CoreOpenSwoole Psr (Provided within OpenSwoole Core)OpenSwoole GRPCOpenSwoole IDE HelperOpenSwoole DashboardHello world<?php
use OpenSwoole\Http\Server;
use OpenSwoole\Http\Request;
use OpenSwoole\Http\Response;
$server = new OpenSwoole\HTTP\Server("127.0.0.1", 9501);
$server->on("start", function (Server $server) {
echo "OpenSwoole http server is started at http://127.0.0.1:9501\n";
});
$server->on("request", function (Request $request, Response $response) {
$response->header("Content-Type", "text/plain");
$response->end("Hello World\n");
});
$server->start();
Interested with Open Swoole? Get Started with Open Swoole now!You can also check the Open Swoole Error Codes.DocumentationIntroductionGet started with OpenSwooleInstallationBackground KnowledgeCommon QuestionsOpen Swoole ComponentsOpenSwoole ExtensionOpenSwoole CoreOpenSwoole PSROpenSwoole GRPCOpenSwoole DashboardOpenSwoole IDE HelperOpen Swoole ServerTCP/UDP ServerHTTP ServerWebSocket ServerMQTT ServerGRPC ServerPHP CoroutinePHP Coroutine / PHP FiberCoroutine HooksCoroutine SystemCoroutine ChannelCoroutine WaitGroupCoroutine co::runCoroutine TCP ServerCoroutine ClientsCoroutine TCP/UDP ClientCoroutine HTTP ClientCoroutine HTTP2 ClientCoroutine Postgres ClientCoroutine GRPC ClientMultiprocessingMultiprocessingProcessProcess PoolTableAtomicLockHave more questions or need support? - Checkout the community page or the Open Swoole Quick Start guide. We even have a Support Service as well.Last updated on December 22, 2022⭐ at GithubFollow TwitterSubscribe NewsletterJoin SlackJoin DiscordOpen SwooleOpen Swoole is an open source production ready high performance coroutine fiber async solution for PHP, previously named Swoole.Quick LinksHow it worksSwoole LabsGet StartedOpen Swoole FrameworksSupported VersionsOpen Swoole BookOpen Swoole ExamplesOpen Swoole GithubTrademark PolicyCopyright © 2017 - 2022, Transfon Ltd, all rights reserved. Swoole® and OpenSwoole™ are trademarks Swoole Labs, Transfon Ltd, all rights reserved.Contact Us: [email protected]Consent Settings

Copyright ©uecom 京ICP备18064371号-3 IPV6
2024-03-29 13:31:51
zxsbr.com
10.0.12.16