FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
php-websocket/client/test_server.php at master · xhat/php-websocket · GitHub
xhat
/
php-websocket
Public
forked from
bloatless/php-websocket
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
php-websocket
/
client
/
test_server.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
28 lines (24 loc) · 547 Bytes
Breadcrumbs
php-websocket
/
client
/
test_server.php
Copy path
File metadata and controls
28 lines (24 loc) · 547 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
ini_set
(
'
display_errors
'
,
1
);
error_reporting
(
E_ALL
);
require_once
'
lib/class.websocket_client.php
'
;
$
clients
=
array
();
$
testClients
=
30
;
$
testMessages
=
500
;
for
(
$
i
=
0
;
$
i
<
$
testClients
;
$
i
++)
{
$
clients
[
$
i
] =
new
WebsocketClient
;
$
clients
[
$
i
]->
connect
(
'
127.0.0.1
'
,
8000
,
'
/demo
'
,
'
foo.lh
'
);
}
usleep
(
5000
);
$
payload
=
json_encode
(
array
(
'
action
'
=>
'
echo
'
,
'
data
'
=>
'
dos
'
));
for
(
$
i
=
0
;
$
i
<
$
testMessages
;
$
i
++)
{
$
clientId
=
rand
(
0
,
$
testClients
-
1
);
$
clients
[
$
clientId
]->
sendData
(
$
payload
);
usleep
(
5000
);
}
usleep
(
5000
);
Back
|
FazBrowse Home
|
New Git URL