Exemplo n.º 1
0
        private static LeaveGroupWithAckMessage CreateLeaveGroupWithAckMessage(ref MessagePackReader reader, int arrayLength)
        {
            var connectionId = ReadString(ref reader, "connectionId");
            var groupName    = ReadString(ref reader, "groupName");
            var ackId        = ReadInt32(ref reader, "ackId");

            var result = new LeaveGroupWithAckMessage(connectionId, groupName, ackId);

            if (arrayLength >= 5)
            {
                result.ReadExtensionMembers(ref reader);
            }
            return(result);
        }
Exemplo n.º 2
0
 private static void WriteLeaveGroupWithAckMessage(ref MessagePackWriter writer, LeaveGroupWithAckMessage message)
 {
     writer.WriteArrayHeader(4);
     writer.Write(ServiceProtocolConstants.LeaveGroupWithAckMessageType);
     writer.Write(message.ConnectionId);
     writer.Write(message.GroupName);
     writer.Write(message.AckId);
 }