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 ?

In reply to Re^2: Perl IO::Socket::SSL persistent TCP connection by kamrul
in thread Perl IO::Socket::SSL persistent TCP connection by kamrul

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.