PHPackages                             alexya-framework/sockswork - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. alexya-framework/sockswork

ActiveFramework[Framework](/categories/framework)

alexya-framework/sockswork
==========================

Alexya's SocksWork components

3.0.1(9y ago)022GNUPHPPHP &gt;=7.0

Since Aug 24Pushed 9y ago1 watchersCompare

[ Source](https://github.com/AlexyaFramework/SocksWork)[ Packagist](https://packagist.org/packages/alexya-framework/sockswork)[ RSS](/packages/alexya-framework-sockswork/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (3)Used By (0)

SocksWork
=========

[](#sockswork)

Alexya's SocksWork library

Contents
--------

[](#contents)

- [SocksWork](#sockswork)
- [PacketBuilder](#packet_builder)
- [Encoder](#encoder)

SocksWork
----------------------------------------------

[](#sockswork-1)

The class `\Alexya\SocksWork\SocksWork` provides an easy way to connect to a server and send packets.

The constructor accepts as parameter the host of the server, the port and the timeout of the connection. It also accepts as 4th parameter a boolean that indicates if SocksWork should connect to the server once the constructor has finnished or not, by default it's set to true, however if you set it to false you'll need to call the `\Alexya\SocksWork\SocksWork::connect` method.

Example:

```
