-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathconf.go
More file actions
25 lines (20 loc) · 752 Bytes
/
conf.go
File metadata and controls
25 lines (20 loc) · 752 Bytes
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
package rudp
import "time"
//rudp
var corruptTick int = 5
var expiredTick int = 1e2 * 60 * 5 //5 minute on sendTick 1e7
var sendDelayTick int = 1
var missingTime int = 1e7
func SetCorruptTick(tick int) { corruptTick = tick }
func SetExpiredTick(tick int) { expiredTick = tick }
func SetSendDelayTick(tick int) { sendDelayTick = tick }
func SetMissingTime(miss int) { missingTime = miss }
//rudp conn
var debug bool = false
var autoSend bool = true
var sendTick time.Duration = 1e7
var maxSendNumPerTick int = 500
func SetDebug(d bool) { debug = d }
func SetAtuoSend(send bool) { autoSend = send }
func SetSendTick(tick time.Duration) { sendTick = tick }
func SetMaxSendNumPerTick(n int) { maxSendNumPerTick = n }