Reuse code by clue · Pull Request #1 · clue/php-socket-react · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .gitignore
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# CHANGELOG

This file is a manually maintained list of changes for each release. Feel free
to add your changes here when sending pull requests. Also send corrections if
you spot any mistakes.

## 0.2.0 (2013-XX-XX)

* BC break: Whole new API regarding `SelectPoller` and dedicated `SocketSelectLoop`
* BC break: Rename `Datagram\Datagram` to `Datagram\Socket`
* BC break: Remove `bind()`, `connect()` and `setOptionBroadcast()` methods and
add respective options to the `Datagram\Factory` class (#1). This is done in
order to keep the API clean and to avoid confusion as to when it's safe to
invoke those methods.
* Feature: Implement common `Datagram\SocketInterface` from `clue/datagram`

## 0.1.0 (2013-04-18)

* First tagged release

27 changes: 27 additions & 0 deletions Socket/React/Datagram/Buffer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

namespace Socket\React\Datagram;

use Datagram\Buffer as DatagramBuffer;

class Buffer extends DatagramBuffer
{
protected function handleWrite($data, $remoteAddress)
{
if ($remoteAddress === null) {
$this->socket->send($data, 0);
} else {
$this->socket->sendTo($data, 0, $remoteAddress);
}
}

protected function handlePause()
{
$this->loop->removeWriteStream($this->socket->getResource());
}

protected function handleResume()
{
$this->loop->addWriteStream($this->socket->getResource(), array($this, 'onWritable'));
}
}
137 changes: 0 additions & 137 deletions Socket/React/Datagram/Datagram.php

This file was deleted.

58 changes: 0 additions & 58 deletions Socket/React/Datagram/DatagramBuffer.php

This file was deleted.

49 changes: 39 additions & 10 deletions Socket/React/Datagram/Factory.php
Loading