toJson method

dynamic toJson()

Implementation

toJson() {
  switch (type) {
    case ClientMsgType.EVENT:
      return _eventToJson();
    case ClientMsgType.REQ:
      return _reqToJson();
    case ClientMsgType.CLOSE:
      return _closeToJson();
    case ClientMsgType.COUNT:
      throw Exception("COUNT is not implemented yet");
  }
}