Skip to content

Commit e08ffb9

Browse files
committed
Describing how to change the host the socket is listening on.
1 parent 04101e2 commit e08ffb9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ Here is a server that closes the connection if you send it anything.
3434
$socket->listen(1337);
3535

3636
$loop->run();
37+
38+
You can change the host the socket is listening on through a second parameter
39+
provided to the listen method:
40+
41+
$socket->listen(1337, '192.168.0.1');
3742

3843
Here's a client that outputs the output of said server and then attempts to
3944
send it a string.

0 commit comments

Comments
 (0)