Parser.php
786 字节
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
namespace PHPSocketIO\Parser;
class Parser
{
/**
* Packet type `connect`.
*
* @api public
*/
const CONNECT = 0;
/**
* Packet type `disconnect`.
*
* @api public
*/
const DISCONNECT = 1;
/**
* Packet type `event`.
*
* @api public
*/
const EVENT = 2;
/**
* Packet type `ack`.
*
* @api public
*/
const ACK = 3;
/**
* Packet type `error`.
*
* @api public
*/
const ERROR = 4;
/**
* Packet type 'binary event'
*
* @api public
*/
const BINARY_EVENT = 5;
/**
* Packet type `binary ack`. For acks with binary arguments.
*
* @api public
*/
const BINARY_ACK = 6;
public static $types = array(
'CONNECT',
'DISCONNECT',
'EVENT',
'BINARY_EVENT',
'ACK',
'BINARY_ACK',
'ERROR'
);
}