Exemplo n.º 1
0
 private static void WriteJoinGroupMessage(ref MessagePackWriter writer, JoinGroupMessage message)
 {
     writer.WriteArrayHeader(3);
     writer.Write(ServiceProtocolConstants.JoinGroupMessageType);
     writer.Write(message.ConnectionId);
     writer.Write(message.GroupName);
 }
Exemplo n.º 2
0
        private static JoinGroupMessage CreateJoinGroupMessage(ref MessagePackReader reader, int arrayLength)
        {
            var connectionId = ReadString(ref reader, "connectionId");
            var groupName    = ReadString(ref reader, "groupName");

            var result = new JoinGroupMessage(connectionId, groupName);

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