debug AdcProtocol implementation

--HG--
branch : adc
This commit is contained in:
mappu 2017-11-22 19:11:40 +13:00
parent 5c4d6d8355
commit b022c9534a

28
AdcProtocol.go Normal file
View File

@ -0,0 +1,28 @@
package libnmdc
type AdcProtocol struct {
hc *HubConnection
}
func NewAdcProtocol(hc *HubConnection) *AdcProtocol {
proto := AdcProtocol{}
proto.hc = hc
return &proto
}
var _ Protocol = &AdcProtocol{} // assert interface implementation
func (this *AdcProtocol) ProcessCommand(msg string) {
this.hc.processEvent(HubEvent{EventType: EVENT_DEBUG_MESSAGE, Message: msg})
}
func (this *AdcProtocol) SayPublic(msg string) {
}
func (this *AdcProtocol) SayPrivate(user, message string) {
}
func (this *AdcProtocol) ProtoMessageSeparator() string {
return "\n"
}