예제 #1
0
func filterMsgType(t messages.MessageType) connection.MessageFilter {
	return func(m connection.Message) bool {
		return messages.PeakType(m.Payload) == t
	}
}
예제 #2
0
func filterMessages(msg connection.Message) bool {
	return messages.PeakType(msg.Payload) != messages.HELLO && messages.PeakType(msg.Payload) != messages.HELLOOK && messages.PeakType(msg.Payload) != messages.DOHAVE && messages.PeakType(msg.Payload) != messages.HAVE && messages.PeakType(msg.Payload) != messages.CONNECT && messages.PeakType(msg.Payload) != messages.END
}