[jdev] How to send Tcp message using libjingle

Vinay Agarwal vinaykagarwal at hotmail.com
Tue Oct 17 22:18:38 CDT 2006


Hello,

I am trying to make libjingle 0.3.0's pcp sample work when the client and 
server are behind separate NATs. (It works  just fine when they are behind 
the same NAT.) I am using port 5222 simply because the code has that as 
default. My system is Win XP/SP2 with Visual Studio 2005. The log is pasted 
below. Any guidance would be very helpful since I am stuck here. Thanks in 
advance.

Regards,
Vinay Agarwal
################################################################################################################################################################
Server Log
----------------------------------------------------------------------------------------------------------------------------------------------------------------
[149:594] [3a4] Phase=UDP Step=0
[149:625] [3a4] SEND >>>>>>>>>>>>>>>>>>>>>>>>> : Tue Oct 17 19:41:10 2006
[149:625] [3a4]    <iq to="client at gmail.com/pcp9BCA4BE2" type="set">
[149:625] [3a4]      <session xmlns="http://www.google.com/session" 
type="candidates" id="2582313455" initiator="client at gmail.com/pcp9BCA4BE2">
[149:625] [3a4]        <candidate name="tcp" address="192.168.2.6" 
port="13962" username="wFe6e71DZKMx2+OT" password="WI4BFPgLiL3vAPLP" 
preference="1" protocol="udp" type="local" network="0" generation="2"/>
[149:625] [3a4]      </session>
[149:625] [3a4]    </iq>
[149:734] [3a4] Phase=TCP Step=2
[149:953] [3a4] SEND >>>>>>>>>>>>>>>>>>>>>>>>> : Tue Oct 17 19:41:11 2006
[149:969] [3a4]    <iq to="client at gmail.com/pcp9BCA4BE2" type="set">
[149:969] [3a4]      <session xmlns="http://www.google.com/session" 
type="candidates" id="2582313455" initiator="client at gmail.com/pcp9BCA4BE2">
[149:969] [3a4]        <candidate name="tcp" address="192.168.2.6" 
port="13963" username="eF1o8pS6HCW+N6Z4" password="TK6g/Ybb2EspB+tg" 
preference="0.8" protocol="tcp" type="local" network="0" generation="1"/>
[149:969] [3a4]      </session>
[149:969] [3a4]    </iq>
[150:437] [3a4] RECV <<<<<<<<<<<<<<<<<<<<<<<<< : Tue Oct 17 19:41:11 2006
[150:500] [3a4]    <iq to="server at gmail.com/pcpD5760D09" type="set" 
from="client at gmail.com/pcp9BCA4BE2">
[150:500] [3a4]      <session type="candidates" id="2582313455" 
initiator="client at gmail.com/pcp9BCA4BE2" 
xmlns="http://www.google.com/session">
[150:500] [3a4]        <candidate name="tcp" address="192.168.1.88" 
port="18211" username="x1r2CGvKm6vvIjOL" password="E5rUM6jBK0X+Hfvk" 
preference="1" protocol="udp" type="local" network="0" generation="2"/>
[150:500] [3a4]      </session>
[150:500] [3a4]    </iq>
[150:500] [3a4]    <iq type="result" to="server at gmail.com/pcpD5760D09" id="" 
from="client at gmail.com/pcp9BCA4BE2"/>
[150:500] [3a4]    <iq to="server at gmail.com/pcpD5760D09" type="set" 
from="client at gmail.com/pcp9BCA4BE2">
[150:500] [3a4]      <session type="candidates" id="2582313455" 
initiator="client at gmail.com/pcp9BCA4BE2" 
xmlns="http://www.google.com/session">
[150:500] [3a4]        <candidate name="tcp" address="192.168.1.88" 
port="18212" username="i+EQCYFn3SOpZwgj" password="TGYREDyQlONSrUtV" 
preference="0.8" protocol="tcp" type="local" network="0" generation="1"/>
[150:500] [3a4]      </session>
[150:500] [3a4]    </iq>
[150:500] [3a4]    <iq type="result" to="server at gmail.com/pcpD5760D09" id="" 
from="client at gmail.com/pcp9BCA4BE2"/>
[150:500] [3a4] SEND >>>>>>>>>>>>>>>>>>>>>>>>> : Tue Oct 17 19:41:11 2006
[150:531] [3a4]    <iq type="result" to="client at gmail.com/pcp9BCA4BE2" 
id=""/>
[150:562] [3a4] SEND >>>>>>>>>>>>>>>>>>>>>>>>> : Tue Oct 17 19:41:11 2006
[150:594] [3a4]    <iq type="result" to="client at gmail.com/pcp9BCA4BE2" 
id=""/>
[150:703] [3a4] Pruning candidate from old generation: 192.168.1.88:18199
[150:734] [3a4] Connecting to 192.168.1.88:18212
[150:859] [3a4] Phase=RELAY Step=1
[151:031] [3a4] Phase=SSLTCP Step=3
[151:922] [3a4] Phase=TCP Step=2
[152:015] [3a4] Connecting to 192.168.1.88:18212
[152:047] [3a4] SEND >>>>>>>>>>>>>>>>>>>>>>>>> : Tue Oct 17 19:41:13 2006
[152:047] [3a4]    <iq to="client at gmail.com/pcp9BCA4BE2" type="set">
[152:047] [3a4]      <session xmlns="http://www.google.com/session" 
type="candidates" id="2582313455" initiator="client at gmail.com/pcp9BCA4BE2">
[152:047] [3a4]        <candidate name="tcp" address="192.168.2.6" 
port="13965" username="rI0V17mdDhJ2u6tE" password="cqyycPSjRSisT8UA" 
preference="0.8" protocol="tcp" type="local" network="0" generation="2"/>
[152:047] [3a4]      </session>
[152:047] [3a4]    </iq>
[152:390] [3a4] RECV <<<<<<<<<<<<<<<<<<<<<<<<< : Tue Oct 17 19:41:13 2006
[152:437] [3a4]    <iq to="server at gmail.com/pcpD5760D09" type="set" 
from="client at gmail.com/pcp9BCA4BE2">
[152:437] [3a4]      <session type="candidates" id="2582313455" 
initiator="client at gmail.com/pcp9BCA4BE2" 
xmlns="http://www.google.com/session">
[152:469] [3a4]        <candidate name="tcp" address="192.168.1.88" 
port="18230" username="9pQHSRjxmZ8OV+4Y" password="84+qdQEvEyVbrDRZ" 
preference="0.8" protocol="tcp" type="local" network="0" generation="2"/>
[152:469] [3a4]      </session>
[152:500] [3a4]    </iq>
[152:531] [3a4]    <iq type="result" to="server at gmail.com/pcpD5760D09" id="" 
from="client at gmail.com/pcp9BCA4BE2"/>
[152:531] [3a4] SEND >>>>>>>>>>>>>>>>>>>>>>>>> : Tue Oct 17 19:41:13 2006
[152:531] [3a4]    <iq type="result" to="client at gmail.com/pcp9BCA4BE2" 
id=""/>
[152:781] [3a4] Connecting to 192.168.1.88:18230
[152:812] [3a4] Connecting to 192.168.1.88:18230
[152:844] [3a4] Pruning candidate from old generation: 192.168.1.88:18212
[153:265] [3a4] Phase=SSLTCP Step=3
[154:312] [3a4] Warning(physicalsocketserver.cc:1067): PhysicalSocketServer 
got FD_CONNECT_BIT error 10060
[160:078] [3a4] Destroying port: tcp-local
[160:109] [3a4] Removed port from allocator: 1 remaining
[160:140] [3a4] Removed port from p2p socket: 3 remaining
[162:140] [3a4] Destroying port: tcp-local
[162:140] [3a4] Removed port from allocator: 0 remaining
[162:140] [3a4] Removed port from p2p socket: 3 remaining
[162:937] [3a4] Destroying connection: from 192.168.2.6:13960 to 
192.168.1.88:18112
[162:937] [3a4] Removed connection from p2p socket: 7 remaining
[163:531] [3a4] Destroying connection: from 192.168.2.6:13960 to 
192.168.1.88:18199
[163:531] [3a4] Removed connection from p2p socket: 6 remaining
################################################################################################################################################################
Client Log
----------------------------------------------------------------------------------------------------------------------------------------------------------------
[022:671] [170c] Phase=UDP Step=0
[022:687] [170c] SEND >>>>>>>>>>>>>>>>>>>>>>>>> : Tue Oct 17 19:41:06 2006
[022:687] [170c]    <iq to="server at gmail.com/pcpD5760D09" type="set">
[022:687] [170c]      <session xmlns="http://www.google.com/session" 
type="candidates" id="2582313455" initiator="client at gmail.com/pcp9BCA4BE2">
[022:687] [170c]        <candidate name="tcp" address="192.168.1.88" 
port="18211" username="x1r2CGvKm6vvIjOL" password="E5rUM6jBK0X+Hfvk" 
preference="1" protocol="udp" type="local" network="0" generation="2"/>
[022:687] [170c]      </session>
[022:687] [170c]    </iq>
[022:859] [170c] RECV <<<<<<<<<<<<<<<<<<<<<<<<< : Tue Oct 17 19:41:06 2006
[022:859] [170c]    <iq to="client at gmail.com/pcp9BCA4BE2" type="set" 
from="server at gmail.com/pcpD5760D09">
[022:859] [170c]      <session type="candidates" id="2582313455" 
initiator="client at gmail.com/pcp9BCA4BE2" 
xmlns="http://www.google.com/session">
[022:859] [170c]        <candidate name="tcp" address="192.168.2.6" 
port="13962" username="wFe6e71DZKMx2+OT" password="WI4BFPgLiL3vAPLP" 
preference="1" protocol="udp" type="local" network="0" generation="2"/>
[022:859] [170c]      </session>
[022:859] [170c]    </iq>
[022:859] [170c] SEND >>>>>>>>>>>>>>>>>>>>>>>>> : Tue Oct 17 19:41:06 2006
[022:859] [170c]    <iq type="result" to="server at gmail.com/pcpD5760D09" 
id=""/>
[022:859] [170c] Pruning candidate from old generation: 192.168.2.6:13960
[022:890] [170c] Phase=TCP Step=2
[022:890] [170c] SEND >>>>>>>>>>>>>>>>>>>>>>>>> : Tue Oct 17 19:41:07 2006
[022:890] [170c]    <iq to="server at gmail.com/pcpD5760D09" type="set">
[022:890] [170c]      <session xmlns="http://www.google.com/session" 
type="candidates" id="2582313455" initiator="client at gmail.com/pcp9BCA4BE2">
[022:906] [170c]        <candidate name="tcp" address="192.168.1.88" 
port="18212" username="i+EQCYFn3SOpZwgj" password="TGYREDyQlONSrUtV" 
preference="0.8" protocol="tcp" type="local" network="0" generation="1"/>
[022:906] [170c]      </session>
[022:906] [170c]    </iq>
[023:218] [170c] RECV <<<<<<<<<<<<<<<<<<<<<<<<< : Tue Oct 17 19:41:07 2006
[023:218] [170c]    <iq to="client at gmail.com/pcp9BCA4BE2" type="set" 
from="server at gmail.com/pcpD5760D09">
[023:218] [170c]      <session type="candidates" id="2582313455" 
initiator="client at gmail.com/pcp9BCA4BE2" 
xmlns="http://www.google.com/session">
[023:218] [170c]        <candidate name="tcp" address="192.168.2.6" 
port="13963" username="eF1o8pS6HCW+N6Z4" password="TK6g/Ybb2EspB+tg" 
preference="0.8" protocol="tcp" type="local" network="0" generation="1"/>
[023:218] [170c]      </session>
[023:218] [170c]    </iq>
[023:218] [170c] SEND >>>>>>>>>>>>>>>>>>>>>>>>> : Tue Oct 17 19:41:07 2006
[023:234] [170c]    <iq type="result" to="server at gmail.com/pcpD5760D09" 
id=""/>
[023:234] [170c] Connecting to 192.168.2.6:13963
[023:687] [170c] Phase=RELAY Step=1
[023:765] [170c] RECV <<<<<<<<<<<<<<<<<<<<<<<<< : Tue Oct 17 19:41:07 2006
[023:765] [170c]    <iq type="result" to="client at gmail.com/pcp9BCA4BE2" 
id="" from="server at gmail.com/pcpD5760D09"/>
[023:875] [170c] RECV <<<<<<<<<<<<<<<<<<<<<<<<< : Tue Oct 17 19:41:08 2006
[023:875] [170c]    <iq type="result" to="client at gmail.com/pcp9BCA4BE2" 
id="" from="server at gmail.com/pcpD5760D09"/>
[023:890] [170c] Phase=SSLTCP Step=3
[024:687] [170c] Phase=TCP Step=2
[024:687] [170c] Connecting to 192.168.2.6:13963
[024:703] [170c] SEND >>>>>>>>>>>>>>>>>>>>>>>>> : Tue Oct 17 19:41:08 2006
[024:703] [170c]    <iq to="server at gmail.com/pcpD5760D09" type="set">
[024:703] [170c]      <session xmlns="http://www.google.com/session" 
type="candidates" id="2582313455" initiator="client at gmail.com/pcp9BCA4BE2">
[024:703] [170c]        <candidate name="tcp" address="192.168.1.88" 
port="18230" username="9pQHSRjxmZ8OV+4Y" password="84+qdQEvEyVbrDRZ" 
preference="0.8" protocol="tcp" type="local" network="0" generation="2"/>
[024:703] [170c]      </session>
[024:703] [170c]    </iq>
[025:281] [170c] RECV <<<<<<<<<<<<<<<<<<<<<<<<< : Tue Oct 17 19:41:09 2006
[025:281] [170c]    <iq to="client at gmail.com/pcp9BCA4BE2" type="set" 
from="server at gmail.com/pcpD5760D09">
[025:281] [170c]      <session type="candidates" id="2582313455" 
initiator="client at gmail.com/pcp9BCA4BE2" 
xmlns="http://www.google.com/session">
[025:281] [170c]        <candidate name="tcp" address="192.168.2.6" 
port="13965" username="rI0V17mdDhJ2u6tE" password="cqyycPSjRSisT8UA" 
preference="0.8" protocol="tcp" type="local" network="0" generation="2"/>
[025:281] [170c]      </session>
[025:281] [170c]    </iq>
[025:281] [170c] SEND >>>>>>>>>>>>>>>>>>>>>>>>> : Tue Oct 17 19:41:09 2006
[025:281] [170c]    <iq type="result" to="server at gmail.com/pcpD5760D09" 
id=""/>
[025:281] [170c] Connecting to 192.168.2.6:13965
[025:296] [170c] Connecting to 192.168.2.6:13965
[025:296] [170c] Pruning candidate from old generation: 192.168.2.6:13963
[025:687] [170c] Phase=SSLTCP Step=3
[025:750] [170c] RECV <<<<<<<<<<<<<<<<<<<<<<<<< : Tue Oct 17 19:41:09 2006
[025:750] [170c]    <iq type="result" to="client at gmail.com/pcp9BCA4BE2" 
id="" from="server at gmail.com/pcpD5760D09"/>
[026:343] [170c] Warning(physicalsocketserver.cc:1067): PhysicalSocketServer 
got FD_CONNECT_BIT error 10060
[032:781] [170c] Destroying port: tcp-local
[032:781] [170c] Removed port from allocator: 1 remaining
[032:796] [170c] Removed port from p2p socket: 3 remaining
[034:781] [170c] Destroying port: tcp-local
[034:781] [170c] Removed port from allocator: 0 remaining
[034:781] [170c] Removed port from p2p socket: 3 remaining
[035:984] [170c] Destroying connection: from 192.168.1.88:18199 to 
192.168.2.6:13952
[035:984] [170c] Removed connection from p2p socket: 7 remaining
[036:312] [170c] Destroying connection: from 192.168.1.88:18199 to 
192.168.2.6:13960
[036:312] [170c] Removed connection from p2p socket: 6 remaining





More information about the JDev mailing list