We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a0be632 commit 6379a0dCopy full SHA for 6379a0d
Datagram/Socket.php
@@ -7,7 +7,7 @@
7
8
/** @event message */
9
// interface similar to Stream
10
-class Socket extends EventEmitter
+class Socket extends EventEmitter implements SocketInterface
11
{
12
protected $loop;
13
protected $socket;
Datagram/SocketInterface.php
@@ -0,0 +1,20 @@
1
+<?php
2
+
3
+namespace Datagram;
4
5
+use Evenement\EventEmitterInterface;
6
+/**
+ * @event message($data, $remoteAddress)
+ * @event error($exception)
+ */
+interface SocketInterface extends EventEmitterInterface
+{
+ public function send($data, $remoteAddress = null);
14
15
+ public function close();
16
17
+ public function resume();
18
19
+ public function pause();
20
+}
0 commit comments