Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

README

A Simple Socket Client for PHP 5.2+
===================================

This library contains one class, SimpleSocketClient, that implements a generic
socket client. You can either inherit this class or use instances of this class
to write client libraries for any modern text-based protocol.

Fully featured client libraries, included as examples:

  * Clamd
  * HTTP
  * Memcached
  * Redis

Features:

  * Socket creation, reading, and writing (of course).
  * Lazy loading : will not connect until actually needed.
  * Automatically deal with end-of-line CRLF sequences.
  * Basic key validation and command building helper methods.

Public methods:

  * __construct($host, $port, $timeout = 5)
  * connect()
  * disconnect()
  * read($bytes, $autonewline = true, $trim = true)
  * readline($trim = true)
  * write($string, $autonewline = true)
  * validate_key($key)
  * build_command()

License: MIT License.

About

A simple socket client for PHP 5.2+, bundled with a collection of useful client libraries.

Resources

Releases

No releases published

Packages

No packages published

Languages