Network News Transfer Protocol (NNTP) bindings for React.
PHP Ruby Puppet
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
src/Rvdv/React/Nntp Fixed variable syntax issue. Jan 10, 2014
vagrant Removed TODO statements. Oct 21, 2013
.travis.yml Only generate Clover XML on Travis env. Aug 14, 2013 Added some badges. Oct 21, 2013
phpunit.xml.dist Only generate Clover XML on Travis env. Aug 14, 2013

NNTP Component

Network News Transfer Protocol (NNTP) bindings for React. This component builds on top of the SocketClient component to implement NNTP.

Latest Stable Version Total Downloads Latest Unstable Version Build Status Coverage Status SensioLabsInsight


The recommended way to install react-nntp is through composer.

    "require": {
        "rvdv/react-nntp": "1.0.*@dev"

Basic Usage

Here is a simple example that fetches the first 100 articles from the 'php.doc' newsgroup of the PHP mailing list.

use React\Dns\Resolver\Factory as ResolverFactory;
use React\EventLoop\Factory as EventLoopFactory;
use Rvdv\React\Nntp\Client;
use Rvdv\React\Nntp\Command\CommandInterface;
use Rvdv\React\Nntp\Response\ResponseInterface;

$loop = EventLoopFactory::create();

$dnsResolverFactory = new ResolverFactory();
$dns = $dnsResolverFactory->createCached('', $loop);

$client = Client::factory($loop, $dns);

$group = null;
$format = null;

    ->connect('', 119)
    ->then(function (ResponseInterface $response) use ($client) {
        return $client->overviewFormat();
    ->then(function (CommandInterface $command) use (&$format, $client) {
        $format = $command->getResult();

        return $client->group('php.doc');
    ->then(function (CommandInterface $command) use (&$group, &$format, $client) {
        $group = $command->getResult();

        return $client->overview($group->getFirst() . '-' . ($group->getFirst() + 99), $format);
    ->then(function (CommandInterface $command) use ($client) {
        $articles = $command->getResult();
        // Process the articles further.




To run the test suite, you need PHPUnit.

$ phpunit


You can also use the configured Vagrant VM for local development. Move into the /vagrant directory and run the following commands;

# Resolve the Puppet dependencies through librarian-puppet.
$ gem install librarian-puppet
$ librarian-puppet install

$ vagrant up