Ejemplo n.º 1
0
 private static void WriteLeaveGroupMessage(ref MessagePackWriter writer, LeaveGroupMessage message)
 {
     writer.WriteArrayHeader(3);
     writer.Write(ServiceProtocolConstants.LeaveGroupMessageType);
     writer.Write(message.ConnectionId);
     writer.Write(message.GroupName);
 }
Ejemplo n.º 2
0
        private static LeaveGroupMessage CreateLeaveGroupMessage(ref MessagePackReader reader, int arrayLength)
        {
            var connectionId = ReadString(ref reader, "connectionId");
            var groupName    = ReadString(ref reader, "groupName");

            var result = new LeaveGroupMessage(connectionId, groupName);

            if (arrayLength >= 4)
            {
                result.ReadExtensionMembers(ref reader);
            }
            return(result);
        }