public static byte[] BuildMessage(msgType type, string stringData)
        {
            var fbb = new FlatBufferBuilder(1024);

            switch (type)
            {
            case msgType.SocketCreateOrJoinRoom:
                var cjString     = fbb.CreateString(stringData);
                var cjRoomOffset = StringData.CreateStringData(fbb, cjString);
                ServerMessage.StartServerMessage(fbb);
                ServerMessage.AddType(fbb, msgType.SocketCreateOrJoinRoom);
                ServerMessage.AddDataType(fbb, msg.StringData);
                ServerMessage.AddData(fbb, cjRoomOffset.Value);
                var builtMessage = ServerMessage.EndServerMessage(fbb);
                fbb.Finish(builtMessage.Value);
                return(fbb.SizedByteArray());
            }
            return(null);
        }