Hi, Thanks for your reply. I get the below while having debug on.
DEBUG: .../IO/Socket/SSL.pm:1464: new ctx 145780168
DEBUG: .../IO/Socket/SSL.pm:332: socket not yet connected
DEBUG: .../IO/Socket/SSL.pm:334: socket connected
DEBUG: .../IO/Socket/SSL.pm:347: ssl handshake not started
DEBUG: .../IO/Socket/SSL.pm:390: Net::SSLeay::connect -> 1
DEBUG: .../IO/Socket/SSL.pm:445: ssl handshake done
write_all VM at entry=vm_unknown
written so far 124:124 bytes (VM=vm_unknown)
write_all VM at entry=vm_unknown
written so far 188:188 bytes (VM=vm_unknown)
got 147:0 bytes (VM=vm_unknown).
got 197:147 bytes (VM=vm_unknown).
got 0:344 bytes (VM=vm_unknown).
got 0:0 bytes (VM=vm_unknown).
DEBUG: .../IO/Socket/SSL.pm:1201: SSL read errorerror:00000000:lib(0):
+func(0):reason(0)
<stream:stream from="gcm.googleapis.com" id="626DAFBE58C7FD0D" version
+="1.0" xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:
+client"><stream:features><mechanisms xmlns="urn:ietf:params:xml:ns:xm
+pp-sasl"><mechanism>X-OAUTH2</mechanism><mechanism>X-GOOGLE-TOKEN</me
+chanism><mechanism>PLAIN</mechanism></mechanisms></stream:features>Au
+th error
DEBUG: .../IO/Socket/SSL.pm:1500: free ctx 145780168 open=145780168
DEBUG: .../IO/Socket/SSL.pm:1508: OK free ctx 145780168
Someone told me the server is closing the connection as Im using print <$client> as it will try to read all lines from the socket and all lines is only finished once the server has closed the connection.
Then what is the best way to send request to the server and waiting for the response, checking the response and sending a response back ? (using IO::Socket::SSL). Can anyone give me an example ? |