File tree 2 files changed +20
-1
lines changed
2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 1
1
2
2
# SocketServer
3
3
4
- A library for create network applications with PHP.
4
+ An useful library for creating asynchronous network applications with PHP.
5
5
6
6
> If you like this project gift us a ⭐.
7
7
8
+ ## Features.
9
+
10
+ - Asynchronous connections.
11
+ - Multiple configuration options.
12
+ - Event system to implement the application logic.
13
+ - Logs support.
14
+
8
15
## Installation.
9
16
10
17
$ composer require thenlabs/socket-server
Original file line number Diff line number Diff line change @@ -210,6 +210,18 @@ public function stop(): void
210
210
}
211
211
}
212
212
213
+ /**
214
+ * Read input data from a client socket.
215
+ *
216
+ * With this method it's implements the strategy for read the input data from clients. Can be
217
+ * seen that by default the sockets are read using the fgets function. In case which will be
218
+ * necessary to implement a custom strategy, it's should override this method.
219
+ *
220
+ * Keep in mind that this method is the responsible to trigger the event.
221
+ *
222
+ * @param Connection $connection
223
+ * @return void
224
+ */
213
225
public function readDataFromConnection (Connection $ connection ): void
214
226
{
215
227
$ data = fgets ($ connection ->getSocket ());
You can’t perform that action at this time.
0 commit comments