-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig-example.yaml
More file actions
38 lines (38 loc) · 2.87 KB
/
config-example.yaml
File metadata and controls
38 lines (38 loc) · 2.87 KB
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
acceptor:
transport:
send:
serialize: "Text" # Text or Protobuf, as an acceptor, which serialize type is used to send message, the default value is Text
compress: "None" # None,Snappy,FLate,Gzip, the higher compression rate, means the higher demand for CPU, and the lower demand for bandwidth, the default value is None
receive:
serialize: "Text" # Text or Protobuf, as an acceptor, which serialize type is used to receive message , the default value is Text
compress: "None" # None,Snappy,FLate,Gzip, the higher compression rate, means the higher demand for CPU, and the lower demand for bandwidth, the default value is None
websocket: # acceptor websocket specific configuration
messageType: "Text" # Text or Binary, which type is used to send message, the default value is Text
remoteAddrHeaderName: "" # Use custom header name and controlled by the developers to avoid fake IP, if using proxy
heartbeat:
pingInterval: 5 # Time interval for actively initiating a heartbeat to the client, unit:seconds, need to be set to a positive integer greater than 0, the default value is 5
pingMaxTimes: 2 # When N times of ping messages are continuously sent to the client, but the client did not reply to any of these messages, the server actively disconnects, which needs to be set to a positive integer greater than 0, the default value is 2
logs:
heartbeat:
pingSend: true # Server sends a ping message to the client
pingSendPrintDelay: 0 # Unit:ms, Only print logs longer than x milliseconds, the default value is 0
pingReceive: true # Receive ping message from client
pongReceive: true # Receive pong message from client
room:
join: true # client join room
leave: true # client leave room
leaveAll: true # client leave from acceptor and leave all the rooms
initiator:
transport:
send:
serialize: "Text" # Text or Protobuf, as an initiator, which serialize type is used to send message, the default value is Text
compress: "None" # None,Snappy,FLate,Gzip, the higher compression rate, means the higher demand for CPU, and the lower demand for bandwidth, the default value is None
receive:
serialize: "Text" # Text or Protobuf, as an initiator, which serialize type is used to receive message , the default value is Text
compress: "None" # None,Snappy,FLate,Gzip, the higher compression rate, means the higher demand for CPU, and the lower demand for bandwidth, the default value is None
websocket: # initiator websocket specific configuration
messageType: "Text" # Text or Binary, which type is used to send message, the default value is Text
logs:
heartbeat: # The current heartbeat mode is: server send a ping message to the client, and the client must reply a pong message
pingReceive: true # Receive ping message from server
pongReceive: true # Receive pong message from server