forked from quickfixgo/quickfix
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmsg_type.go
More file actions
27 lines (23 loc) · 703 Bytes
/
msg_type.go
File metadata and controls
27 lines (23 loc) · 703 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
26
27
package quickfix
import "bytes"
var msgTypeHeartbeat = []byte("0")
var msgTypeLogon = []byte("A")
var msgTypeTestRequest = []byte("1")
var msgTypeResendRequest = []byte("2")
var msgTypeReject = []byte("3")
var msgTypeSequenceReset = []byte("4")
var msgTypeLogout = []byte("5")
//isAdminMessageType returns true if the message type is a session level message.
func isAdminMessageType(m []byte) bool {
switch {
case bytes.Equal(msgTypeHeartbeat, m),
bytes.Equal(msgTypeLogon, m),
bytes.Equal(msgTypeTestRequest, m),
bytes.Equal(msgTypeResendRequest, m),
bytes.Equal(msgTypeReject, m),
bytes.Equal(msgTypeSequenceReset, m),
bytes.Equal(msgTypeLogout, m):
return true
}
return false
}