private void handleInteractionTick(EventInteractionTick tick) { WarPb.S_War_Do msg = toProtoDo(tick); //Google.Protobuf.WellKnownTypes.Any any = Google.Protobuf.WellKnownTypes.Any.Pack(msg); //client.SendAsync(new ArraySegment<byte>(any.Value.ToByteArray()), WebSocketMessageType.Binary, true, cancelActionToken); SendMessageAsync(msg); }
private WarPb.S_War_Do toProtoDo(EventInteractionTick tick) { WarPb.S_War_Do msg = new WarPb.S_War_Do(); msg.Id = ID; //msg.Action = global::Google.Protobuf.WellKnownTypes.Any.Pack(action); msg.Action = PBCode.InteractionToAny(tick); return(msg); }