Download the PHP package imafaz/esock without Composer
On this page you can find all versions of the php package imafaz/esock. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Vendor imafaz
Package esock
Short Description lightweight php library for simple socketing.
License MIT
Homepage https://github.com/imafaz/Esock
Package esock
Short Description lightweight php library for simple socketing.
License MIT
Homepage https://github.com/imafaz/Esock
Please rate this library. Is it a good library?
Informations about the package esock
lightweight php library for simple socketing
Esock is a lightweight library for create socket and read,write
- Requirements
- Installation
- Quick Start
- Usage
- Available Method
- License
Requirements
This library is supported by PHP versions 7.0 or higher
neili uses the socket php extention
Installation
The preferred way to install this extension is through Composer.
To install Esock, simply:
$ composer require imafaz/Esock
Quick Start
To use this library with Composer:
Usage
Create an instance of Esock
server side:
client side:
Available Method
- initServer
Atttribute | Description | Type | Required | Default |
---|---|---|---|---|
$ip | server listening ip | string | yes | null |
$port | server listening port | int | yes | null |
# Return (bool)
- initClient
Atttribute | Description | Type | Required | Default |
---|---|---|---|---|
$ip | server ip | string | yes | null |
$port | server port | int | yes | null |
# Return (bool)
- accept
# Return (object|bool)
- read
Atttribute | Description | Type | Required | Default |
---|---|---|---|---|
$clientSocket | client accept socket | object | yes | null |
# Return (string|bool)
- write
Atttribute | Description | Type | Required | Default |
---|---|---|---|---|
$clientSocket | client accept socket | object | yes | null |
$output | text to write | string | yes | null |
# Return (bool)
- close
Atttribute | Description | Type | Required | Default |
---|---|---|---|---|
$socket | socket object | object | yes | null |
# Return (bool)
License
- This script is licensed under the MIT License.
All versions of esock with dependencies
PHP Build Version
Package Version
Requires
php-64bit Version
>=7.0
The package imafaz/esock contains the following files
Loading the files please wait ....