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; }
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); }
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); }
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); }
/// <summary> /// Server has sent a version update. /// </summary> /// <param name="version"></param> public virtual void Version(Version version) { }
/// <summary> /// Server has sent a version update /// </summary> /// <param name="version"></param> public virtual void Version(Version version) { }