network/client_type.go

29 lines
752 B
Go
Raw Normal View History

2022-10-11 17:36:09 +08:00
package network
const (
// ClientTypeNone is connection type "None".
ClientTypeNone ClientType = 0xFF
// ClientTypeProtocolGateway is connection type "Protocol Gateway".
ClientTypeProtocolGateway ClientType = 0x5F
// ClientTypeMessageQueue is connection type "Message Queue".
ClientTypeMessageQueue ClientType = 0x5E
// ClientTypeStreamFunction is connection type "Stream Function".
ClientTypeStreamFunction ClientType = 0x5D
)
// ClientType represents the connection type.
type ClientType byte
func (c ClientType) String() string {
switch c {
case ClientTypeProtocolGateway:
return "Source"
case ClientTypeMessageQueue:
return "Message Queue"
case ClientTypeStreamFunction:
return "Stream Function"
default:
return "None"
}
}