1 Reply Latest reply on Sep 23, 2009 12:19 PM by 807567

    port event mechanism and full dupex socket -AIO with Completion Port


      I just started to port code from Windows OS to Solaris. I need a way to implement something similar to AIO with Completion Port from Windows on Solaris OS. After initial investigation I have discovered port - events API.
      It is quite elegant.

      The problem is that I can't figure out if it is possible to use single port to achieve full duplex socketing.
      This means is it possible to serve both POLLIN & POLLOUT for given socket ( PORT_SOURCE_FD ) with single port ?

      From port_associate man pages it seems that it is not possible to achieve something like that.

      "... If the specified object is already
      associated with the specified port, the port_associate()
      function serves to update the events and user arguments of
      the association. ..."

      Does this means that I need to create two separate ports - one for POLLIN events and the other for POLLOUT events in order to be able to achieve full duplex concurrent socket ?

      Since I'm quite new in Solaris development I would kindly ask you to give me a hint what would be the best way to implement something similar to Windows Asynchronous IO With Completion Port on Solaris OS.

      Many thanks