public VoIPClientDialog( IVoiceClientEventCommunicator eventCommunicator, String strDM, String strVoiceServerHostname, int iVoiceServerPort, String strConaitoServerPasswd) { InitializeComponent(); voIPClientControl1.initialize(eventCommunicator, strDM, strVoiceServerHostname, iVoiceServerPort, strConaitoServerPasswd); }
public VoIPClientDialog( IVoiceClientEventCommunicator eventCommunicator, String strDM, String strVoiceServerHostname, int iVoiceServerPort, String strConaitoServerPasswd ) { InitializeComponent(); voIPClientControl1.initialize( eventCommunicator, strDM, strVoiceServerHostname, iVoiceServerPort, strConaitoServerPasswd ); }
public void initialize( IVoiceClientEventCommunicator controller, String strDM, String strVoiceServerHostname, int iVoiceServerPort, String strConaitoServerPasswd) { if (null == controller) { throw new Exception("Voice client controller is null"); } m_eventCommunicator = controller; _strDM = strDM; _strVoiceServerHostname = strVoiceServerHostname; _iVoiceServerPort = iVoiceServerPort; _strConaitoServerPasswd = strConaitoServerPasswd; // It can take a while for a remote server to exchange the messages, // so give it a few tries to initialize. bool bAuthorized = false; for (int i = 0; i < 5; i++) { if (m_voipclient.InitVoIP(true)) { bAuthorized = true; logDebugOnly( String.Format("Conaito initialization succeeded for user {0}\n", strDM)); logDebugOnly( String.Format(" VoiceServerHostname = {0}, VoiceServerPort = {1}\n", strVoiceServerHostname, Convert.ToInt32(iVoiceServerPort).ToString())); break; } else { System.Threading.Thread.Sleep(100); } } if (!bAuthorized) { throw new Exception("Voice client failed to initialize"); } }
public void initialize( IVoiceClientEventCommunicator controller, String strDM, String strVoiceServerHostname, int iVoiceServerPort, String strConaitoServerPasswd ) { if ( null == controller ) { throw new Exception( "Voice client controller is null" ); } m_eventCommunicator = controller; _strDM = strDM; _strVoiceServerHostname = strVoiceServerHostname; _iVoiceServerPort = iVoiceServerPort; _strConaitoServerPasswd = strConaitoServerPasswd; // It can take a while for a remote server to exchange the messages, // so give it a few tries to initialize. bool bAuthorized = false; for ( int i = 0; i < 5; i++ ) { if ( m_voipclient.InitVoIP( true ) ) { bAuthorized = true; logDebugOnly( String.Format( "Conaito initialization succeeded for user {0}\n", strDM ) ); logDebugOnly( String.Format( " VoiceServerHostname = {0}, VoiceServerPort = {1}\n", strVoiceServerHostname, Convert.ToInt32( iVoiceServerPort ).ToString() ) ); break; } else { System.Threading.Thread.Sleep( 100 ); } } if (!bAuthorized) { throw new Exception( "Voice client failed to initialize" ); } foreach (String channelName in DDD_Global.Instance.VoiceChannels.Keys) { notifyVoiceChannelCreated(channelName, DDD_Global.Instance.VoiceChannels[channelName]); } // Further Voice initialization. Moved from control load event. Bug 4598 bool soundInited = initSoundSystem(); if (soundInited && Connect()) { // Register push-to-talk key bHotKeyRegistered = m_voipclient.RegisterHotKey( kiPUSH_TO_TALK_ID, false, // control false, // alt false, // shift false, // windows key kcPushToTalkKey); this.m_timer1.Tick += new System.EventHandler(this.timer1_Tick); // Give it a little time or you won't get the nodes when you log in // I found it works at 1/2 second but not less -- shorvitz 3/10/08 System.Threading.Thread.Sleep(500); login(); } }
public void initialize( //IVoiceClientEventCommunicator controller, String strDM, int channelID, String strVoiceServerHostname, int iVoiceServerPort, String strConaitoServerPasswd, IVoiceClientEventCommunicator eventCommunicator) { //if (null == controller) //{ // throw new Exception("Voice client controller is null"); //} //m_eventCommunicator = controller; _strDM = strDM; _strVoiceServerHostname = strVoiceServerHostname; _iVoiceServerPort = iVoiceServerPort; _strConaitoServerPasswd = strConaitoServerPasswd; _iChannelID = channelID; m_eventCommunicator = eventCommunicator; // It can take a while for a remote server to exchange the messages, // so give it a few tries to initialize. bool bAuthorized = false; for (int i = 0; i < 5; i++) { if (m_voipclient.InitVoIP(true)) { bAuthorized = true; //logDebugOnly( // String.Format("Conaito initialization succeeded for user {0}\n", strDM)); //logDebugOnly( // String.Format(" VoiceServerHostname = {0}, VoiceServerPort = {1}\n", // strVoiceServerHostname, Convert.ToInt32(iVoiceServerPort).ToString())); break; } else { System.Threading.Thread.Sleep(100); } } if (!bAuthorized) { throw new Exception("Voice client failed to initialize"); } //String strChannelPassword = ""; //String strTopic = ""; //String strOpPassword = ""; bool soundInited = initSoundSystem(); if (soundInited && Connect()) { // Register push-to-talk key bHotKeyRegistered = m_voipclient.RegisterHotKey( kiPUSH_TO_TALK_ID, false, // control false, // alt false, // shift false, // windows key kcPushToTalkKey); //this.m_timer1.Tick += new System.EventHandler( this.timer1_Tick ); // Give it a little time or you won't get the nodes when you log in // I found it works at 1/2 second but not less -- shorvitz 3/10/08 System.Threading.Thread.Sleep(500); login(); System.Threading.Thread.Sleep(500); //bool joinsuccess = m_voipclient.DoJoinChannel(m_voipclient.GetChannelPath(_iChannelID), strChannelPassword, strTopic, strOpPassword); //TODO: Note: This happens on the main thread it seems, so the above sleep for 1000 ms occurs for EACH voice channel //this user is allowed to join. Test a scenario with 6 voice channels that start at time 1, and the client freezes //from time 1 to time 7. Need to figure a reasonable workaround for this. } }
public void initialize( IVoiceClientEventCommunicator controller, String strDM, String strVoiceServerHostname, int iVoiceServerPort, String strConaitoServerPasswd ) { if ( null == controller ) { throw new Exception( "Voice client controller is null" ); } m_eventCommunicator = controller; _strDM = strDM; _strVoiceServerHostname = strVoiceServerHostname; _iVoiceServerPort = iVoiceServerPort; _strConaitoServerPasswd = strConaitoServerPasswd; // It can take a while for a remote server to exchange the messages, // so give it a few tries to initialize. bool bAuthorized = false; for ( int i = 0; i < 5; i++ ) { if ( m_voipclient.InitVoIP( true ) ) { bAuthorized = true; logDebugOnly( String.Format( "Conaito initialization succeeded for user {0}\n", strDM ) ); logDebugOnly( String.Format( " VoiceServerHostname = {0}, VoiceServerPort = {1}\n", strVoiceServerHostname, Convert.ToInt32( iVoiceServerPort ).ToString() ) ); break; } else { System.Threading.Thread.Sleep( 100 ); } } if (!bAuthorized) { throw new Exception( "Voice client failed to initialize" ); } }