<?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 Problem about reading data on a TCP socket in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-about-reading-data-on-a-tcp-socket/m-p/1136742#M531955</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt; &lt;BR /&gt; I support an application compiled under HP10.20 and running on B2000 station under HP11.11, which is an HMI displaying data received from other equipments. This application is composed with several processes which one is dedicated to the communication between HMI processes and the application running under other equipments. The communication in this process is based on sockets and pipes : pipe with the HMI processes, socket UDP to manage the detection of clients, sockets TCP to receive and to send data from/to clients of other equipments when the connexion is established with them.&lt;BR /&gt; I think that the managment of the communications is classic :&lt;BR /&gt; - loop calling the select function to wait data from all the file descriptors of the sockets and pipes added through the FD_SET macro&lt;BR /&gt; - check the return of the select function&lt;BR /&gt; - if the return of select function &amp;gt; 0, detection of the file descriptor concerned through the FD_ISSET macro&lt;BR /&gt; - call recv function on the file descriptor concerned&lt;BR /&gt; Problem is that sometimes, when there is much traffic, the return of the select function is &amp;gt;0, the file descriptor detected is a TCP socket, but the recv function on this TCP socket returns 0. Our application treats that as a disconnexion !&lt;BR /&gt; How may you explain that the select function detects data on a socket (return&amp;gt;0) and that the recv function on this socket is unable to read the data (return=0)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;P.S. This thread has been moved from &lt;SPAN&gt;Workstations - Itanium-Based, hp9000, Visualize to HP-UX &amp;gt; networking&lt;/SPAN&gt;. -HP Forum Moderator&lt;/P&gt;</description>
    <pubDate>Tue, 11 Feb 2014 04:51:05 GMT</pubDate>
    <dc:creator>Guilhaumou Vincent2</dc:creator>
    <dc:date>2014-02-11T04:51:05Z</dc:date>
    <item>
      <title>Problem about reading data on a TCP socket</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-about-reading-data-on-a-tcp-socket/m-p/1136742#M531955</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt; &lt;BR /&gt; I support an application compiled under HP10.20 and running on B2000 station under HP11.11, which is an HMI displaying data received from other equipments. This application is composed with several processes which one is dedicated to the communication between HMI processes and the application running under other equipments. The communication in this process is based on sockets and pipes : pipe with the HMI processes, socket UDP to manage the detection of clients, sockets TCP to receive and to send data from/to clients of other equipments when the connexion is established with them.&lt;BR /&gt; I think that the managment of the communications is classic :&lt;BR /&gt; - loop calling the select function to wait data from all the file descriptors of the sockets and pipes added through the FD_SET macro&lt;BR /&gt; - check the return of the select function&lt;BR /&gt; - if the return of select function &amp;gt; 0, detection of the file descriptor concerned through the FD_ISSET macro&lt;BR /&gt; - call recv function on the file descriptor concerned&lt;BR /&gt; Problem is that sometimes, when there is much traffic, the return of the select function is &amp;gt;0, the file descriptor detected is a TCP socket, but the recv function on this TCP socket returns 0. Our application treats that as a disconnexion !&lt;BR /&gt; How may you explain that the select function detects data on a socket (return&amp;gt;0) and that the recv function on this socket is unable to read the data (return=0)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;P.S. This thread has been moved from &lt;SPAN&gt;Workstations - Itanium-Based, hp9000, Visualize to HP-UX &amp;gt; networking&lt;/SPAN&gt;. -HP Forum Moderator&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2014 04:51:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-about-reading-data-on-a-tcp-socket/m-p/1136742#M531955</guid>
      <dc:creator>Guilhaumou Vincent2</dc:creator>
      <dc:date>2014-02-11T04:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: Problem about reading data on a TCP socket</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-about-reading-data-on-a-tcp-socket/m-p/1136743#M531956</link>
      <description>With the exception of one (IIRC obsucre) flavor of non-blocking I/O, a read/recv return of 0 does indeed mean disconnection, and that is a condition under which select() should return with the socket writable - what makes you think you are getting a mistaken read return of zero?&lt;BR /&gt;&lt;BR /&gt;&lt;INSERT usual="" question="" about="" being="" up="" on="" the="" lastest="" patches="" here=""&gt;&lt;/INSERT&gt;</description>
      <pubDate>Sat, 13 Feb 2010 00:44:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-about-reading-data-on-a-tcp-socket/m-p/1136743#M531956</guid>
      <dc:creator>rick jones</dc:creator>
      <dc:date>2010-02-13T00:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Problem about reading data on a TCP socket</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-about-reading-data-on-a-tcp-socket/m-p/1136744#M531957</link>
      <description>&lt;P&gt;The correct forum for HP-UX networking questions is the EBC forum: HP-UX &amp;gt; networking:&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://h30499.www3.hp.com/t5/Networking/bd-p/itrc-245"&gt;http://h30499.www3.hp.com/t5/Networking/bd-p/itrc-245&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2014 21:17:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-about-reading-data-on-a-tcp-socket/m-p/1136744#M531957</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2014-02-10T21:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: Problem about reading data on a TCP socket</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-about-reading-data-on-a-tcp-socket/m-p/1136745#M531958</link>
      <description>OK, I have transferred the problem to the forum "HP-UX &amp;gt; networking", with adding a code extract.&lt;BR /&gt;Thanks.</description>
      <pubDate>Mon, 15 Feb 2010 10:08:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-about-reading-data-on-a-tcp-socket/m-p/1136745#M531958</guid>
      <dc:creator>Guilhaumou Vincent2</dc:creator>
      <dc:date>2010-02-15T10:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: Problem about reading data on a TCP socket</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-about-reading-data-on-a-tcp-socket/m-p/1136746#M531959</link>
      <description>&lt;P&gt;Your new topic:&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://h30499.www3.hp.com/t5/Networking/Problem-about-reading-data-on-a-TCP-socket/m-p/4583966"&gt;http://h30499.www3.hp.com/t5/Networking/Problem-about-reading-data-on-a-TCP-socket/m-p/4583966&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2014 21:16:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-about-reading-data-on-a-tcp-socket/m-p/1136746#M531959</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2014-02-10T21:16:45Z</dc:date>
    </item>
  </channel>
</rss>

