Skip to content

Commit 6231316

Browse files
committed
Try it
1 parent 0062f91 commit 6231316

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Server.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,4 +125,14 @@ public function __destruct()
125125
socket_close($this->socket);
126126
}
127127

128-
}
128+
}
129+
130+
// Mantap, sekarang kita coba.
131+
$websocket = new WebSocket("127.0.0.1", 12345);
132+
133+
$websocket->setOption()
134+
->bind()
135+
->listen()
136+
->handshake();
137+
138+
$websocket->broadcast('Halo kakak!');

0 commit comments

Comments
 (0)