All wodCrypt (12) wodSSH (10) wodSFTP (23) wodSSHServer (1) wodSSHTunnel (11) wodSSHpackage wodSFTPdll wodSSH.NET (10) wodSFTP.NET (24) wodFtpDLX.NET (22) wodWebServer.NET (10) wodAppUpdate (13) wodHttpDLX (8) wodFtpDLX (22) wodTelnetDLX wodFTPServer (3) wodWebServer (10) wodVPN wodXMPP (13) | All ** [Visual Basic] ** [C#] ** [VB.NET] ** Authenticate with Gmail XMPP server
VB code
Dim WithEvents wodXMPP1 As wodXMPPCom Private Sub Form_Load() Set wodXMPP1 = New wodXMPPCom 'Gmail server require SSL encryption to be used. wodXMPP1.Security = SecurityImplicit wodXMPP1.Port = 443 wodXMPP1.Login = "your_gmail_username@gmail.com" wodXMPP1.Password = "your_gmail_password" 'Connect to Gmail XMPP server. wodXMPP1.Connect ("talk.google.com") End Sub 'Connected Event fires when wodXMPP connects to remote server. Private Sub wodXMPP1_Connected() MsgBox "Connected" End Sub 'Disconnected Event fires when wodXMPP disconnects from server. Private Sub wodXMPP1_Disconnected(ByVal ErrorCode As Long, ByVal ErrorText As String) 'Inside Disconnected Event we can check for an error using ErrorText and ErrorCode variable. If ErrorCode <> 0 Then MsgBox "Error: " & ErrorText End If End Sub VB.NET code
Dim WithEvents wodXMPP1 As WODXMPPCOMLib.wodXMPPCom Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load wodXMPP1 = New WODXMPPCOMLib.wodXMPPCom 'Gmail server require SSL encryption to be used. wodXMPP1.Security = WODXMPPCOMLib.SecurityEnum.SecurityImplicit wodXMPP1.Port = 443 wodXMPP1.Login = "your_gmail_username@gmail.com" wodXMPP1.Password = "your_gmail_password" 'Connect to Gmail XMPP server. wodXMPP1.Connect("talk.google.com") End Sub 'Connected Event fires when wodXMPP connects to remote server. Private Sub wodXMPP1_Connected() Handles wodXMPP1.Connected MsgBox("Connected") End Sub 'Disconnected Event fires when wodXMPP disconnects from server. Private Sub wodXMPP1_Disconnected(ByVal ErrorCode As Integer, ByVal ErrorText As String) Handles wodXMPP1.Disconnected 'Inside Disconnected Event we can check for an error using ErrorText and ErrorCode variable. If ErrorCode <> 0 Then MsgBox("Error: " & ErrorText) End If End Sub C# code
WODXMPPCOMLib.wodXMPPCom wodXMPP1; private void Form1_Load(System.Object sender, System.EventArgs e) { wodXMPP1 = new WODXMPPCOMLib.wodXMPPCom(); wodXMPP1.Connected += new WODXMPPCOMLib._IwodXMPPComEvents_ConnectedEventHandler(wodXMPP1_Connected); wodXMPP1.Disconnected += new WODXMPPCOMLib._IwodXMPPComEvents_DisconnectedEventHandler(wodXMPP1_Disconnected); //Gmail server require SSL encryption to be used. wodXMPP1.Security = WODXMPPCOMLib.SecurityEnum.SecurityImplicit; wodXMPP1.Port = 443; wodXMPP1.Login = "your_gmail_username@gmail.com"; wodXMPP1.Password = "your_gmail_password"; //Connect to Gmail XMPP server. wodXMPP1.Connect("talk.google.com"); } //Connected Event fires when wodXMPP connects to remote server. private void wodXMPP1_Connected() { MessageBox.Show("Connected"); } //Disconnected Event fires when wodXMPP disconnects from server. private void wodXMPP1_Disconnected(int ErrorCode, string ErrorText) { //Inside Disconnected Event we can check for an error using ErrorText and ErrorCode variable. if (ErrorCode != 0) { MessageBox.Show("Error: " + ErrorText); } } |