You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-20Lines changed: 19 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,10 +50,29 @@ $factory = new Factory($loop);
50
50
51
51
The `createSender()` method can be used to create a socket capable of sending outgoing multicast datagrams and receiving incoming unicast responses. It returns a [`Socket`](#socket) instance.
52
52
53
+
This method works on PHP versions as old as PHP 5.3 (and up), as its socket API has always been
The `createSender($address)` method can be used to create a socket capable of receiving incoming multicast datagrams and sending outgoing unicast or multicast datagrams. It returns a [`Socket`](#socket) instance.
56
59
60
+
This method requires PHP 5.4 (or up) and ext-sockets.
61
+
Otherwise, it will throw a `BadMethodCallException`.
62
+
This is a requirement because receiving multicast datagrams requires a
These options are only available to the low level socket API (ext-sockets), not
68
+
to the newer stream based networking API.
69
+
70
+
Internally, this library uses a workaround to create stream based sockets
71
+
and then sets the required socket options on its underlying low level socket
72
+
resource.
73
+
This is done because React PHP is built around the general purpose stream based API
74
+
and has only somewhat limited support for the low level socket API.
75
+
57
76
### Socket
58
77
59
78
The [`Factory`](#factory) creates instances of the `React\Datagram\Socket` class from the [react/datagram](https://github.com/reactphp/datagram) package.
@@ -73,26 +92,6 @@ $socket->close();
73
92
74
93
Please refer to the [datagram documentation](https://github.com/reactphp/datagram#usage) for more details.
0 commit comments