Search
Preparing search index...
The search index is not available
pinus
Options
All
Public
Public/Protected
All
Inherited
Only exported
Menu
Globals
HybridSwitcher
Class HybridSwitcher
Switcher for tcp and websocket protocol
param
tcp server instance from node.js net module
Hierarchy
EventEmitter
HybridSwitcher
Implements
IHybridSwitcher
Index
Constructors
constructor
Properties
id
server
set
NoDelay
state
tcpprocessor
timeout
wsprocessor
default
Max
Listeners
Methods
add
Listener
close
emit
event
Names
get
Max
Listeners
listener
Count
listeners
new
Socket
on
once
prepend
Listener
prepend
Once
Listener
process
Http
process
Tcp
remove
All
Listeners
remove
Listener
set
Max
Listeners
listener
Count
Constructors
constructor
new
Hybrid
Switcher
(
server
:
Server
, opts
:
HybridSwitcherOptions
)
:
HybridSwitcher
Parameters
server:
Server
opts:
HybridSwitcherOptions
Returns
HybridSwitcher
Properties
id
id
:
number
server
server
:
Server
set
NoDelay
set
NoDelay
:
boolean
state
state
:
number
tcpprocessor
tcpprocessor
:
TCPProcessor
timeout
timeout
:
number
wsprocessor
wsprocessor
:
WSProcessor
Static
default
Max
Listeners
default
Max
Listeners
:
number
Methods
add
Listener
add
Listener
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
close
close
(
)
:
void
Returns
void
emit
emit
(
event
:
string
|
symbol
,
...
args
:
any
[]
)
:
boolean
Parameters
event:
string
|
symbol
Rest
...
args:
any
[]
Returns
boolean
event
Names
event
Names
(
)
:
Array
<
string
|
symbol
>
Returns
Array
<
string
|
symbol
>
get
Max
Listeners
get
Max
Listeners
(
)
:
number
Returns
number
listener
Count
listener
Count
(
type
:
string
|
symbol
)
:
number
Parameters
type:
string
|
symbol
Returns
number
listeners
listeners
(
event
:
string
|
symbol
)
:
Function
[]
Parameters
event:
string
|
symbol
Returns
Function
[]
new
Socket
new
Socket
(
socket
:
Socket
)
:
void
Parameters
socket:
Socket
Returns
void
on
on
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
once
once
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
prepend
Listener
prepend
Listener
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
prepend
Once
Listener
prepend
Once
Listener
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
Private
process
Http
process
Http
(
processor
:
WSProcessor
, socket
:
Socket
, data
:
Buffer
)
:
void
Parameters
processor:
WSProcessor
socket:
Socket
data:
Buffer
Returns
void
Private
process
Tcp
process
Tcp
(
processor
:
TCPProcessor
, socket
:
Socket
, data
:
Buffer
)
:
void
Parameters
processor:
TCPProcessor
socket:
Socket
data:
Buffer
Returns
void
remove
All
Listeners
remove
All
Listeners
(
event
?:
string
|
symbol
)
:
this
Parameters
Optional
event:
string
|
symbol
Returns
this
remove
Listener
remove
Listener
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
set
Max
Listeners
set
Max
Listeners
(
n
:
number
)
:
this
Parameters
n:
number
Returns
this
Static
listener
Count
listener
Count
(
emitter
:
EventEmitter
, event
:
string
|
symbol
)
:
number
Parameters
emitter:
EventEmitter
event:
string
|
symbol
Returns
number
Globals
Hybrid
Switcher
constructor
id
server
set
NoDelay
state
tcpprocessor
timeout
wsprocessor
default
Max
Listeners
add
Listener
close
emit
event
Names
get
Max
Listeners
listener
Count
listeners
new
Socket
on
once
prepend
Listener
prepend
Once
Listener
process
Http
process
Tcp
remove
All
Listeners
remove
Listener
set
Max
Listeners
listener
Count
Switcher for tcp and websocket protocol
tcp server instance from node.js net module