FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
koding/node_modules_koding/koding-dnode/test/recon.js at master · koding/koding · GitHub
This repository was archived by the owner on Aug 15, 2022. It is now read-only.
koding
/
koding
Public archive
Notifications
You must be signed in to change notification settings
Fork
604
Star
2.2k
Code
Issues
246
Pull requests
6
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
koding
/
node_modules_koding
/
koding-dnode
/
test
/
recon.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
44 lines (36 loc) · 1.13 KB
Breadcrumbs
koding
/
node_modules_koding
/
koding-dnode
/
test
/
recon.js
Copy path
File metadata and controls
executable file
·
44 lines (36 loc) · 1.13 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
var
dnode
=
require
(
'../'
)
;
var
test
=
require
(
'tap'
)
.
test
;
test
(
'recon'
,
function
(
t
)
{
t
.
plan
(
4
)
;
var
port
=
Math
.
floor
(
Math
.
random
(
)
*
40000
+
10000
)
;
var
scounts
=
{
connect
:
0
,
ready
:
0
}
;
var
ccounts
=
{
connect
:
0
,
ready
:
0
}
;
var
server
=
dnode
(
function
(
remote
,
conn
)
{
scounts
.
connect
++
;
conn
.
on
(
'ready'
,
function
(
)
{
scounts
.
ready
++
;
}
)
;
}
)
.
listen
(
port
)
;
dnode
(
function
(
remote
,
conn
)
{
ccounts
.
connect
++
;
conn
.
on
(
'ready'
,
function
(
)
{
ccounts
.
ready
++
;
setTimeout
(
function
(
)
{
if
(
ccounts
.
ready
>=
4
)
{
conn
.
end
(
)
;
}
else
{
conn
.
stream
.
end
(
)
;
}
}
,
25
)
;
}
)
;
}
)
.
connect
(
port
,
{
reconnect
:
100
}
)
;
setTimeout
(
function
(
)
{
t
.
ok
(
scounts
.
connect
>=
2
)
;
t
.
ok
(
scounts
.
ready
>=
2
)
;
t
.
equal
(
ccounts
.
connect
,
scounts
.
connect
)
;
t
.
equal
(
ccounts
.
ready
,
scounts
.
ready
)
;
server
.
close
(
)
;
t
.
end
(
)
;
}
,
1000
)
;
}
)
;
Back
|
FazBrowse Home
|
New Git URL