UNPKG
@lvgithub/stick
Version:
latest (3.1.11)
3.1.11
3.1.10
3.1.9
3.1.8
3.1.7
3.1.6
3.1.5
3.1.4
The solution of sticky package problem of TCP for Node.Js !
github.com/lvgithub/stick
lvgithub/stick
@lvgithub/stick
/
typings
/
stick.d.ts
14 lines
(13 loc)
•
294 B
TypeScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
export
enum
MaxBodyLen
{
'32K'
,
'2048M'
}
declare
function
callback
(
buf
:
Buffer
):
void
export
class
Stick
{
constructor
(
bufferSize
:
number
)
putData
(
buf
:
Buffer
)
onData
(callback)
onBody
(callback)
makeData
(
body
:
string
):
Buffer
setMaxBodyLen
(
length
:
MaxBodyLen
) }