Download the PHP package huang-yi/laravel-swoole-http without Composer

On this page you can find all versions of the php package huang-yi/laravel-swoole-http. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-swoole-http

Laravel-Swoole-Http

Build Status

A high performance HTTP server based on Swoole. And now, it also supports WebSocket server.

Translations

Requirements

Installation & Setup

  1. This package can be installed via composer:

  2. Register service provider(Optional)

You need to register the service provider manually, if your Laravel version is less than 5.5 or you are using Lumen:

  1. Configurations

Run this command to publish the configuration file:

Click here for more information about the configurations.

  1. Start server

Run this command to start the server:

And then, you can visit your website via http://127.0.0.1:1215.

Click here for more information about the commands.

Configurations

driver

This option controls the default "driver" that will be used to create the server.

Supported: "http", "websocket"

host

The ip address of the server.

port

The port of the server.

options

The swoole server configurations. Get more information from the official documents.

Notice: The value of task_worker_num must be greater than 0 if you use task.

resets

This option controls the instances that need to be reset after each request. It helps developers avoid problems caused by singleton, such as auth.

message_parser

The WebSocket message parser. You can replace this option with a custom parser.

Notice: The custom parser must implement the HuangYi\Swoole\Contracts\ParserContract.

redis

tables

Define swoole table structures:

Click here for more information about the tables.

watcher

The file watcher configurations.

directories:Defines the list of directories being watched;

excluded_directories:Defines a list of directories not being watched;

suffixes:Defines the list of file suffixes being watched.

Commands

This package provides an artisan command to manage the swoole server.

This command has an "action" argument and the default value is "start".

Actions Description
start Start the swoole server.
stop Stop the swoole server.
reload Reload the swoole server.
restart Restart the swoole server.
watch Enter the watch mode. The swoole server will reload automatically when the watched files changed.

Notice: The swoole server can only run in cli environment.

Tables

The Swoole Table can help developers to share data across worker processes. You can define the table structures in the configuration file.

Click here for more information about the Swoole Tables.

Task

Define a task:

Send the task to the task worker processes:

Notice: To start the task worker processes, the value of task_worker_num must be set to greater than 0.

Nginx

Notice: Add the ip of swoole server (the default is 127.0.0.1) to the middleware App\Http\Middleware\TrustProxies.

Tips


All versions of laravel-swoole-http with dependencies

PHP Build Version
Package Version
Requires ext-swoole Version >=1.9.5
huang-yi/swoole-watcher Version 0.0.*
illuminate/console Version ~5.2
illuminate/contracts Version ~5.2
illuminate/events Version ~5.2
illuminate/http Version ~5.2
illuminate/pipeline Version ~5.2
illuminate/redis Version ~5.2
illuminate/support Version ~5.2
league/flysystem Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package huang-yi/laravel-swoole-http contains the following files

Loading the files please wait ....