From b022c9534a7f7f79791c3156ee97e0bf090c6475 Mon Sep 17 00:00:00 2001 From: mappu Date: Wed, 22 Nov 2017 19:11:40 +1300 Subject: [PATCH] debug AdcProtocol implementation --HG-- branch : adc --- AdcProtocol.go | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 AdcProtocol.go diff --git a/AdcProtocol.go b/AdcProtocol.go new file mode 100644 index 0000000..156ef83 --- /dev/null +++ b/AdcProtocol.go @@ -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" +}