PHP Classes
elePHPant
Icontem

PHP Multiplexed I/O: Manage multiple simultaneous network connections

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (11)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2007-04-12 (8 years ago) RSS 2.0 feedStarStarStar 59%Total: 1,079 All time: 3,247 This week: 1,426Up
Version License PHP version Categories  
phpmio 0.1BSD License5.2Networking, PHP 5, Files and Folders
Description Author  

This package can be used to manage multiple simultaneous network connections or file accesses. It is loosely based on the selectable channels implementation from Java's NIO package.

It can create streams to access files, access network servers or accept connections from network clients.

The streams can be set to non-blocking mode, so this package can manage the access to data read or written to multiple streams simultaneously.

It can register selectors for all the streams, so it can wait and handle the data read or written to multiple streams when it is ready.

Innovation Award  
PHP Programming Innovation award nominee
April 2007
Number 4
Some applications require retrieving information from many sources, like files or remote network connections.

Using synchronous access, a regular script can only access one data source at a time. If a script needs to poll multiple sources, not only it may take a lot of time, but waiting from one source to respond may halt the script forever.

An alternative approach to retrieve data from many sources is to use asynchronous access to poll many sources at the same time. This way it does not block the applications from doing parallel processing while waiting for the data to come.

This package provides a solution that uses non-blocking streams to provide simultaneous access to multiple files or network connections for any PHP application.

Manuel Lemos
Picture of Robert Young
Name: Robert Young <contact>
Classes: 2 packages by
Country: United Kingdom United Kingdom
Age: 34
All time rank: 184978 in United Kingdom United Kingdom
Week rank: 1752 Up78 in United Kingdom United Kingdom Equal
Innovation award
Innovation award
Nominee: 2x

  Files folder image Files  
File Role Description
Files folder imageexample (2 files)
Files folder imagetests (4 files)
Plain text file Exception.php Class Exception classes
Plain text file SelectionKey.php Class Contains the SelectionKey class
Plain text file Selector.php Class Contains the Selector class
Plain text file Stream.php Class Contains the Stream class
Plain text file StreamFactory.php Class Contains the StreamFactory class

  Files folder image Files  /  example  
File Role Description
  Accessible without login Plain text file downloader.php Example Example of downloading multiple files
  Accessible without login Plain text file riddler.php Example Self contained example

  Files folder image Files  /  tests  
File Role Description
  Accessible without login Plain text file SelectionKeyTest.php Test Unit test for SelectionKey class
  Accessible without login Plain text file SelectorTest.php Test Unit test for Selector class
  Accessible without login Plain text file StreamFactoryTest.php Test Unit test for StreamFactory class
  Accessible without login Plain text file StreamTest.php Test Unit test for StreamTest

 Version Control Unique User Downloads Download Rankings  
 0%Total:1,079All time:3,247
 This week:0This week:1,426Up
 User Ratings  
 
 All time
Utility:75%StarStarStarStar
Consistency:75%StarStarStarStar
Documentation:-
Examples:75%StarStarStarStar
Tests:66%StarStarStarStar
Videos:-
Overall:59%StarStarStar
Rank:987