Skip to content

Commit 271831e

Browse files
committed
Merge branch 'master' into v1.6-master
2 parents ef92a6a + d05dbaa commit 271831e

28 files changed

+378
-316
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ Preferred way to install is with [Composer](https://getcomposer.org/).
2424
composer require textalk/websocket
2525
```
2626

27-
* Current version support PHP versions `^7.2|8.0`.
27+
* Current version support PHP versions `^7.4|^8.0`.
28+
* For PHP `7.2` and `7.3` support use version [`1.5`](https://github.com/Textalk/websocket-php/tree/1.5.0).
2829
* For PHP `7.1` support use version [`1.4`](https://github.com/Textalk/websocket-php/tree/1.4.0).
2930
* For PHP `^5.4` and `7.0` support use version [`1.3`](https://github.com/Textalk/websocket-php/tree/1.3.0).
3031

@@ -63,4 +64,4 @@ Fredrik Liljegren, Armen Baghumian Sankbarani, Ruslan Bekenev,
6364
Joshua Thijssen, Simon Lipp, Quentin Bellus, Patrick McCarren, swmcdonnell,
6465
Ignas Bernotas, Mark Herhold, Andreas Palm, Sören Jensen, pmaasz, Alexey Stavrov,
6566
Michael Slezak, Pierre Seznec, rmeisler, Nickolay V. Shmyrev, Christoph Kempen,
66-
Marc Roberts.
67+
Marc Roberts, Antonio Mora, Simon Podlipsky.

docs/Changelog.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,33 @@
44

55
## `v1.6`
66

7-
> PHP version `^7.3|^8.0`
7+
> PHP version `^7.4|^8.0`
88
99
### `1.6.0`
10-
11-
* Listener functions (@sirn-se)
12-
* Multi connection server (@sirn-se)
13-
* Major refactoring, using Connections (@sirn-se)
10+
* Connection separate from Client and Server (@sirn-se)
11+
* getPier() deprecated, replaces by getRemoteName() (@sirn-se)
12+
* Client accepts Psr\Http\Message\UriInterface as input for URI:s (@sirn-se)
13+
* Bad URI throws exception when Client is instanciated, previously when used (@sirn-se)
14+
* Major internal refactoring (@sirn-se)
15+
* Preparations for multiple conection and listeners (@sirn-se)
1416

1517
## `v1.5`
1618

1719
> PHP version `^7.2|^8.0`
1820
21+
### `1.5.8`
22+
23+
* Handle read error during handshake (@sirn-se)
24+
25+
### `1.5.7`
26+
27+
* Large header block fix (@sirn-se)
28+
29+
### `1.5.6`
30+
31+
* Add test for PHP 8.1 (@sirn-se)
32+
* Code standard (@sirn-se)
33+
1934
### `1.5.5`
2035

2136
* Support for psr/log v2 and v3 (@simPod)

docs/Client.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,27 @@ It internally supports Upgrade handshake and implicit close and ping/pong operat
1010
```php
1111
WebSocket\Client {
1212

13-
public __construct(string $uri, array $options = [])
14-
public __destruct()
15-
public __toString() : string
16-
17-
public text(string $payload) : void
18-
public binary(string $payload) : void
19-
public ping(string $payload = '') : void
20-
public pong(string $payload = '') : void
21-
public send(mixed $payload, string $opcode = 'text', bool $masked = true) : void
22-
public receive() : mixed
23-
public close(int $status = 1000, mixed $message = 'ttfn') : mixed
24-
25-
public getName() : string|null
26-
public getPeer() : string|null
27-
public getLastOpcode() : string
28-
public getCloseStatus() : int
29-
public isConnected() : bool
30-
public setTimeout(int $seconds) : void
31-
public setFragmentSize(int $fragment_size) : self
32-
public getFragmentSize() : int
33-
public setLogger(Psr\Log\LoggerInterface $logger = null) : void
13+
public __construct(UriInterface|string $uri, array $options = []);
14+
public __destruct();
15+
public __toString() : string;
16+
17+
public text(string $payload) : void;
18+
public binary(string $payload) : void;
19+
public ping(string $payload = '') : void;
20+
public pong(string $payload = '') : void;
21+
public send(Message|string $payload, string $opcode = 'text', bool $masked = true) : void;
22+
public close(int $status = 1000, mixed $message = 'ttfn') : void;
23+
public receive() : Message|string|null;
24+
25+
public getName() : string|null;
26+
public getRemoteName() : string|null;
27+
public getLastOpcode() : string;
28+
public getCloseStatus() : int;
29+
public isConnected() : bool;
30+
public setTimeout(int $seconds) : void;
31+
public setFragmentSize(int $fragment_size) : self;
32+
public getFragmentSize() : int;
33+
public setLogger(Psr\Log\LoggerInterface $logger = null) : void;
3434
}
3535
```
3636

docs/Message.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ Additionally;
2121
```php
2222
WebSocket\Message\Message {
2323

24-
public __construct(string $payload = '')
25-
public __toString() : string
26-
27-
public getOpcode() : string
28-
public getLength() : int
29-
public getTimestamp() : DateTime
30-
public getContent() : string
31-
public setContent(string $payload = '') : void
32-
public hasContent() : bool
24+
public __construct(string $payload = '');
25+
public __toString() : string;
26+
27+
public getOpcode() : string;
28+
public getLength() : int;
29+
public getTimestamp() : DateTime;
30+
public getContent() : string;
31+
public setContent(string $payload = '') : void;
32+
public hasContent() : bool;
3333
}
3434
```
3535

docs/Server.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,33 @@ If you require this kind of server behavior, you need to build it on top of prov
1313
```php
1414
WebSocket\Server {
1515

16-
public __construct(array $options = [])
17-
public __destruct()
18-
public __toString() : string
19-
20-
public accept() : bool
21-
public text(string $payload) : void
22-
public binary(string $payload) : void
23-
public ping(string $payload = '') : void
24-
public pong(string $payload = '') : void
25-
public send(mixed $payload, string $opcode = 'text', bool $masked = true) : void
26-
public receive() : mixed
27-
public close(int $status = 1000, mixed $message = 'ttfn') : mixed
28-
29-
public getPort() : int
30-
public getPath() : string
31-
public getRequest() : array
32-
public getHeader(string $header_name) : string|null
33-
34-
public getName() : string|null
35-
public getPeer() : string|null
36-
public getLastOpcode() : string
37-
public getCloseStatus() : int
16+
public __construct(array $options = []);
17+
public __destruct();
18+
public __toString() : string;
19+
20+
public accept() : bool;
21+
public text(string $payload) : void;
22+
public binary(string $payload) : void;
23+
public ping(string $payload = '') : void;
24+
public pong(string $payload = '') : void;
25+
public send(Message|string $payload, string $opcode = 'text', bool $masked = true) : void;
26+
public close(int $status = 1000, mixed $message = 'ttfn') : void;
27+
public receive() : Message|string|null;
28+
29+
public getPort() : int;
30+
public getPath() : string;
31+
public getRequest() : array;
32+
public getHeader(string $header_name) : string|null;
33+
34+
public getName() : string|null;
35+
public getRemoteName() : string|null;
36+
public getLastOpcode() : string;
37+
public getCloseStatus() : int;
3838
public isConnected() : bool
39-
public setTimeout(int $seconds) : void
40-
public setFragmentSize(int $fragment_size) : self
41-
public getFragmentSize() : int
42-
public setLogger(Psr\Log\LoggerInterface $logger = null) : void
39+
public setTimeout(int $seconds) : void;
40+
public setFragmentSize(int $fragment_size) : self;
41+
public getFragmentSize() : int;
42+
public setLogger(Psr\Log\LoggerInterface $logger = null) : void;
4343
}
4444
```
4545

lib/BadUriException.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
<?php
22

3-
/**
4-
* Copyright (C) 2014-2022 Textalk/Abicart and contributors.
5-
*
6-
* This file is part of Websocket PHP and is free software under the ISC License.
7-
* License text: https://raw.githubusercontent.com/Textalk/websocket-php/master/COPYING
8-
*/
9-
103
namespace WebSocket;
114

125
class BadUriException extends Exception

0 commit comments

Comments
 (0)