diff --git a/src/main/hw/connect/BaseConnection.hx b/src/main/hw/connect/BaseConnection.hx index 3c5d13d..6507f42 100755 --- a/src/main/hw/connect/BaseConnection.hx +++ b/src/main/hw/connect/BaseConnection.hx @@ -7,6 +7,8 @@ import promhx.Deferred; import promhx.Promise; import protohx.Message; +using protohx.MessageUtils; + class BaseConnection implements IConnection { public var handler(default, null):Signal; public var sendHandler(default, null):Signal; @@ -41,12 +43,12 @@ class BaseConnection implements IConnection { } public function send(packet:O):Void { - #if proto_debug L.d('Proto', 'send: ${packet}'); #end + #if proto_debug L.d('Proto', 'send: ${packet.toJson()}'); #end sendHandler.emit(packet); } public function receive(packet:I):Void { - #if proto_debug L.d('Proto', 'receive: ${packet}'); #end + #if proto_debug L.d('Proto', 'receive: ${packet.toJson()}'); #end receiveHandler.emit(packet); } }