<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Socket connect request fails with EINPROGRESS in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/socket-connect-request-fails-with-einprogress/m-p/2708861#M723547</link>
    <description>I have a C++ TCP client application which exits when the connect fails&lt;BR /&gt;&lt;BR /&gt;21231: socket(AF_INET, SOCK_STREAM, IPPROTO_IP) = 7&lt;BR /&gt;21231: fcntl(7, F_GETFL, 0) = 2&lt;BR /&gt;21231: fcntl(7, F_SETFL, 65538) = 0&lt;BR /&gt;21231: connect(7, 0x400c4d50, 16) = -1 EINPROGRESS (Operation now in progress)&lt;BR /&gt;21231: time(0x7b03be08) = 0x3cc5260a&lt;BR /&gt;&lt;BR /&gt;The manual for connect explains:&lt;BR /&gt;&lt;BR /&gt;           [EINPROGRESS]            Nonblocking I/O is enabled using                                   O_NONBLOCK, O_NDELAY, or FIOSNBIO, and&lt;BR /&gt;                                    the connection cannot be completed&lt;BR /&gt;                                    immediately.  This is not a failure.&lt;BR /&gt;                                    Make the connect() call again a few&lt;BR /&gt;                                    seconds later.  Alternatively, wait for&lt;BR /&gt;                                    completion by calling select() and&lt;BR /&gt;                                    selecting for write.&lt;BR /&gt;&lt;BR /&gt;Can someone point me to an example C++/C code of a non-blocking connect request.&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
    <pubDate>Tue, 23 Apr 2002 08:06:20 GMT</pubDate>
    <dc:creator>phil atkinson</dc:creator>
    <dc:date>2002-04-23T08:06:20Z</dc:date>
    <item>
      <title>Socket connect request fails with EINPROGRESS</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/socket-connect-request-fails-with-einprogress/m-p/2708861#M723547</link>
      <description>I have a C++ TCP client application which exits when the connect fails&lt;BR /&gt;&lt;BR /&gt;21231: socket(AF_INET, SOCK_STREAM, IPPROTO_IP) = 7&lt;BR /&gt;21231: fcntl(7, F_GETFL, 0) = 2&lt;BR /&gt;21231: fcntl(7, F_SETFL, 65538) = 0&lt;BR /&gt;21231: connect(7, 0x400c4d50, 16) = -1 EINPROGRESS (Operation now in progress)&lt;BR /&gt;21231: time(0x7b03be08) = 0x3cc5260a&lt;BR /&gt;&lt;BR /&gt;The manual for connect explains:&lt;BR /&gt;&lt;BR /&gt;           [EINPROGRESS]            Nonblocking I/O is enabled using                                   O_NONBLOCK, O_NDELAY, or FIOSNBIO, and&lt;BR /&gt;                                    the connection cannot be completed&lt;BR /&gt;                                    immediately.  This is not a failure.&lt;BR /&gt;                                    Make the connect() call again a few&lt;BR /&gt;                                    seconds later.  Alternatively, wait for&lt;BR /&gt;                                    completion by calling select() and&lt;BR /&gt;                                    selecting for write.&lt;BR /&gt;&lt;BR /&gt;Can someone point me to an example C++/C code of a non-blocking connect request.&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Tue, 23 Apr 2002 08:06:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/socket-connect-request-fails-with-einprogress/m-p/2708861#M723547</guid>
      <dc:creator>phil atkinson</dc:creator>
      <dc:date>2002-04-23T08:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: Socket connect request fails with EINPROGRESS</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/socket-connect-request-fails-with-einprogress/m-p/2708862#M723548</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Go to&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h21007.www2.hp.com/" target="_blank"&gt;http://h21007.www2.hp.com/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Search einprogress&lt;BR /&gt;&lt;BR /&gt;Gives a code example to help.&lt;BR /&gt;&lt;BR /&gt;Is developers portal for languages.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;              Steve Steel</description>
      <pubDate>Tue, 23 Apr 2002 10:07:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/socket-connect-request-fails-with-einprogress/m-p/2708862#M723548</guid>
      <dc:creator>Steve Steel</dc:creator>
      <dc:date>2002-04-23T10:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: Socket connect request fails with EINPROGRESS</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/socket-connect-request-fails-with-einprogress/m-p/2708863#M723549</link>
      <description>Thanks for the answer but my client is failing on the connect request. I wanted to know how to use the select call to determine when the socket is connected for reading and writing.</description>
      <pubDate>Tue, 23 Apr 2002 10:23:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/socket-connect-request-fails-with-einprogress/m-p/2708863#M723549</guid>
      <dc:creator>phil atkinson</dc:creator>
      <dc:date>2002-04-23T10:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: Socket connect request fails with EINPROGRESS</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/socket-connect-request-fails-with-einprogress/m-p/2708864#M723550</link>
      <description>There is an example on page 409 of Unix Network Programming, Vol I, 2E W.Richard Stephens. &lt;BR /&gt;&lt;BR /&gt;The bottom line is connect() will return 0 if connected immediately (not likely) , EINPROGRESS if not. &lt;BR /&gt;&lt;BR /&gt;Then, select() returns readable for the socket after the connection is complete.</description>
      <pubDate>Tue, 23 Apr 2002 10:36:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/socket-connect-request-fails-with-einprogress/m-p/2708864#M723550</guid>
      <dc:creator>IT Response</dc:creator>
      <dc:date>2002-04-23T10:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Socket connect request fails with EINPROGRESS</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/socket-connect-request-fails-with-einprogress/m-p/2708865#M723551</link>
      <description>Sorry, it's readable or writeable. &lt;BR /&gt;&lt;BR /&gt;There more to it than that for complete error checking, but those are the basics.</description>
      <pubDate>Tue, 23 Apr 2002 10:41:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/socket-connect-request-fails-with-einprogress/m-p/2708865#M723551</guid>
      <dc:creator>IT Response</dc:creator>
      <dc:date>2002-04-23T10:41:15Z</dc:date>
    </item>
  </channel>
</rss>

