-
Notifications
You must be signed in to change notification settings - Fork 2
/
const.go
42 lines (32 loc) · 802 Bytes
/
const.go
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
package main
import (
"time"
"github.com/gorilla/websocket"
)
const (
protocolVersion1_0 = "1.0"
protocolVersion1_1 = "1.1" // Update following go-easyp2p
protocolVersion1_2 = "1.2"
protocolVersion2_0 = "2.0"
protocolVersionLatest = protocolVersion2_0
)
var protocolVersionArray = []string{
protocolVersion1_0,
protocolVersion1_1,
protocolVersion1_2,
}
var (
binaryVersion = "unknown"
binaryRevision = "unknown"
)
var dialer = websocket.Dialer{
HandshakeTimeout: 5 * time.Second,
}
var upgrader = websocket.Upgrader{
ReadBufferSize: 1024,
WriteBufferSize: 1024,
HandshakeTimeout: 5 * time.Second,
}
const protocolVersionHeaderKey = "X-Ftrans-Protocol-Version"
const defaultSignalingServer = "wss://ftrans.cs3238.com/ws"
const defaultSTUNServer = "stun.l.google.com:19302"