コード例 #1
0
        internal void StartClient(string username, string password)
        {
            ConnectViaTcp();
            var version = new Version
            {
                release    = "Immerse Mumble",
                version    = (1 << 16) | (2 << 8) | (5),
                os         = Environment.OSVersion.ToString(),
                os_version = Environment.OSVersion.VersionString,
            };

            SendMessage(MessageType.Version, version);

            var authenticate = new Authenticate
            {
                username = username,
                password = password,
            };

            SendMessage(MessageType.Authenticate, authenticate);

            // Keepalive, if the Mumble server doesn't get a message
            // for 30 seconds it will close the connection
            var tcpTimer = new Timer();

            tcpTimer.Elapsed += SendPing;
            tcpTimer.Interval = 10000;
            tcpTimer.Enabled  = true;
        }
コード例 #2
0
            private void Handshake(string username, string password, string[] tokens)
            {
                MumbleProto.Version version = new MumbleProto.Version
                {
                    release    = "MumbleSharp",
                    version    = (1 << 16) | (2 << 8) | (0 & 0xFF),
                    os         = Environment.OSVersion.ToString(),
                    os_version = Environment.OSVersion.VersionString,
                };
                Send(PacketType.Version, version);

                Authenticate auth = new Authenticate
                {
                    username = username,
                    password = password,
                    opus     = true,
                };

                auth.tokens.AddRange(tokens ?? new string[0]);
                auth.celt_versions.AddRange(new int[] {
                    unchecked ((int)0x8000000b)
                });

                Send(PacketType.Authenticate, auth);
            }
コード例 #3
0
        public void SendVersion(string clientVersion)
        {
            var message = new MumbleProto.Version();

            message.release = clientVersion;
            message.version = mumbleVersion;
            message.os = Environment.OSVersion.Platform.ToString();
            message.os_version = Environment.OSVersion.VersionString;

            MumbleWrite(message);
        }
コード例 #4
0
        private void SendVersion()
        {
            var version = new Version
            {
                Release   = MumbleClient.ReleaseName,
                version   = (MumbleClient.Major << 16) | (MumbleClient.Minor << 8) | (MumbleClient.Patch),
                Os        = Environment.OSVersion.ToString(),
                OsVersion = Environment.OSVersion.VersionString,
            };

            SendMessage(MessageType.Version, version);
        }
コード例 #5
0
 /// <summary>
 /// Server has sent a version update.
 /// </summary>
 /// <param name="version"></param>
 public virtual void Version(Version version)
 {
 }
コード例 #6
0
 /// <summary>
 /// Server has sent a version update
 /// </summary>
 /// <param name="version"></param>
 public virtual void Version(Version version)
 {
 }