private void SendSerializedMessages(NetFrameStats frameStats) { while (serializationHandler.TryDequeueSerializedMessages(out var messages)) { var metaData = messages.SendAndClear(connection, frameStats); serializationHandler.ReturnSerializedMessageContainer(messages); commandMetaDataManager.AddMetaData(metaData); } }
public void PushMessagesToSend(MessagesToSend messages) { serializedMessagesToSend.SerializeFrom(messages, commandMetaDataManager.GetEmptyMetaDataStorage()); var metaData = serializedMessagesToSend.SendAndClear(connection); commandMetaDataManager.AddMetaData(metaData); serializedMessagesToSend.Clear(); messages.Clear(); }