Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
t3ran13 committed Dec 6, 2017
1 parent c9ba7fa commit 39f052c
Show file tree
Hide file tree
Showing 4 changed files with 260 additions and 182 deletions.
13 changes: 3 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,9 @@ I intentionally needed that for writing a PHP Client for [TrafficCop](https://gi
But the source grows so I decided to move it into an own package.
You can also call this a [pack()](http://www.php.net/manual/en/function.pack.php) wrapper.

## Install

Installation should be done via [composer](http://packagist.org/).

## Install Via Composer
```
{
"require": {
"TrafficCophp/ByteBuffer": "dev-master"
}
}
composer require t3ran13/ByteBuffer
```

## Example
Expand All @@ -32,7 +25,7 @@ use TrafficCophp\ByteBuffer\ByteBuffer;
$channel = 'channel_one';
$message = 'php';

$buffer = new ByteBuffer(4 + 1 + 4 + strlen($channel) + strlen($message));
$buffer = new ByteBuffer();
$buffer->writeInt32BE($buffer->length(), 0);
$buffer->writeInt8(0x1, 4);
$buffer->writeInt32BE(strlen($channel), 5);
Expand Down
147 changes: 0 additions & 147 deletions src/TrafficCophp/ByteBuffer/Buffer.php

This file was deleted.

Loading

0 comments on commit 39f052c

Please sign in to comment.