New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

lamoimage/larasocket

a web socket server build with laravel and swoole
86 4

Larablocks Analysis

lamoimage/larasocket works with any PHP project: the latest release (0.1, Sep 27, 2016) doesn't depend on Laravel.

Recommendation checks

Not advised

Not advised: no release or commit in over 2 years.

  • No release or commit in over 2 years
  • No release in the last 12 months (last: Sep 27, 2016)
  • 0 downloads a month (needs 10,000)
  • 4 GitHub stars (needs 100)

State

Likely abandoned
  • No release or commit in over 2 years.
  • Last stable release: Sep 27, 2016.
  • No releases in the last 12 months.
  • First released: Sep 27, 2016.
  • 0 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Dec 3, 2026.

Install
composer require lamoimage/larasocket
Latest Version:0.1
PHP:>=5.4.0
License:MIT
Last Updated:Jun 17, 2017
Links: GitHub  ·  Packagist
Maintainer: lamoimage

Larasocket - a web socket server build with laravel and swoole

##Screenshot enter image description here

Installation

Make sure you have the SWOOLE PHP package installed. You can find installation instructions at http://pecl.php.net/package/swoole and http://www.swoole.com

run below command to install swool extension and add "extension=swoole.so" to php.ini.

pecl install swoole

Now pull in Larasocket package through Composer.

Run composer require lamoimage/larasocket

And then, if using Laravel 5, include the service provider within config/app.php.

'providers' => [
    Lamoimage\Larasocket\LarasocketServiceProvider::class,
];

Usage

Start the socket service with php artisan socket:start command

php artisan socket:start

Then access the route /larasocket in browser:

If you are using homestead, the url looks like

http://homestead.app/larasocket

You may also do socket:stop/socket:restart to shutdown or restart the socket service.

  • php artisan socket:stop
  • php artisan socket:restart

If you need to modify the socket server partials, you can run:

php artisan vendor:publish

The SWOOLE config file will now be located in the config/larasocket.php.

If you want to handle your own socket service logic, just implement the socket interface located at vendor/lamoimage/larasocket/Socket.php, then register in app/Providers/AppServiceProvider.php,

public function register()
{
	$this->app->bind('Lamoimage\Larasocket\Socket', 'App\Services\MySocket');
}

Related Packages

lactone/laravel-websocket

基于laravel+swoole的webSocket开发库

151 34
yaro/socket

simple websocket implementation for Laravel 4/5

365 11
huang-yi/shadowfax

Run Laravel on Swoole.

1,654 349
silentred/lumoon

Lumen & Swoole

2,238 14
icyboy/swmen

Swoole + Lumen

45 2

Version History

Version Released PHP License
0.1 >=5.4.0 MIT