Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
-glen- #1
Member since Sep 2009 · 16 posts
Group memberships: Members
Show profile · Link to this post
Subject: please correct me if i am doing the wrong way.
good day,

this is how i connect to the openfire server via VPN connection..and it is connected successfully..is it correct to used IP address for my connect server?

one more thing i've used the search forum and tried what they adviced.but it didn't work.in reconnecting do i have to call this code below? or "_connection.open" is enough to reconnect back to the server?.

Connect to openfire server:

Dim jid As Jid = New Jid(txtjid)
        _connection.Username = jid.User
        _connection.Server = jid.Server
        _connection.Password = txtPassword
        _connection.Resource = txtResource
        _connection.Priority = CType(NumPriority.Value, Integer)
        _connection.Port = Integer.Parse(txtPort)
        _connection.UseStartTLS = True
        _connection.UseCompression = False
        _connection.AutoResolveConnectServer = False
        _connection.ConnectServer = "192.168.3.179"
        _connection.Open()

im stuck in here..i cannot reconnect back..ive subcribed to all error event..it is always throws a socket error even though the connection is back..

hop u can help me..pls.
thank you in advance for all the reply.
Avatar
Alex #2
Member since Feb 2003 · 4307 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Did you get an OnClose with your Disconnect before you try to reconnect?
Avatar
-glen- #3
Member since Sep 2009 · 16 posts
Group memberships: Members
Show profile · Link to this post
yes,after i disconnected onclosed event is fired..but when im trying to reconnect back.it gives me socket error..even though connection is back..

is it enough to call only "xmppcon.open" for reconnection?or do i have to call again that code above..

i used timer in reconnecting back to the server if i am disconnected i reconnect back by calling "xmppcon.open" if it fails i started a timer for 10 seconds..10sec. every failed reconnection..this will works when my server is local.but when i connected via VPN connection..i cannot reconnect anymore..socketError event is fired..

thanks alex for the reply.
Avatar
-glen- #4
Member since Sep 2009 · 16 posts
Group memberships: Members
Show profile · Link to this post
thanks, i can reconnect now.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS