Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Application interface to io-pkt for TCP and QNET: (5 Items)
   
Application interface to io-pkt for TCP and QNET  
I am porting an application to QNX (I'm relatively new to QNX) that utilizes 
TCP/IP sockets to implement client-server IPC. I want to maintain the ability 
to use TCP/IP because my test server only runs on Windows. 

I would like my application to utilise native communications when client and 
server are both running on QNX. My reading seems to indicate that io-pkt can 
utilise TCP or QNET so I would like to have my application talk to the io-pkt 
and open a connection across either protocol. I'll know which protocol would
be needed at run time so can give suitably different addresses or what ever.

I want the application to treat the connection as a socket regardless of
the transport mechanism. That is, I want a socket interface implemented 
across a channel rather than IP. Isn't this what io-pkt does?

I don't want to have to re-implement the server as a resource manager.

I can't find straight forward examples of using io-pkt.


Have I got the wrong end of the stick? Is the situation that io-pkt either 
resource manages the /dev/socket OR /dev/net namespace and the two are accessed 
differently: TCP/IP through libsocket and QNET through libc?

In which case is io-pkt smart enough to notice that I am opening a local
TCP socket and implement it really efficiently?

Any help would be appreciated.

PS my application uses the Boost::asio library
Re: Application interface to io-pkt for TCP and QNET  
Mike,

the middleware ZeroMQ ( http://www.zeromq.org ) could be an alternative 
to fiddeling around with io-pkt ...

--Armin


Mike Robins wrote:
> I am porting an application to QNX (I'm relatively new to QNX) that utilizes
> TCP/IP sockets to implement client-server IPC. I want to maintain the ability
> to use TCP/IP because my test server only runs on Windows.
>
> I would like my application to utilise native communications when client and
> server are both running on QNX. My reading seems to indicate that io-pkt can
> utilise TCP or QNET so I would like to have my application talk to the io-pkt
> and open a connection across either protocol. I'll know which protocol would
> be needed at run time so can give suitably different addresses or what ever.
>
> I want the application to treat the connection as a socket regardless of
> the transport mechanism. That is, I want a socket interface implemented
> across a channel rather than IP. Isn't this what io-pkt does?
>
> I don't want to have to re-implement the server as a resource manager.
>
> I can't find straight forward examples of using io-pkt.
>
>
> Have I got the wrong end of the stick? Is the situation that io-pkt either
> resource manages the /dev/socket OR /dev/net namespace and the two are accessed
> differently: TCP/IP through libsocket and QNET through libc?
>
> In which case is io-pkt smart enough to notice that I am opening a local
> TCP socket and implement it really efficiently?
>
> Any help would be appreciated.
>
> PS my application uses the Boost::asio library
>
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post79119
>
>
Re: Application interface to io-pkt for TCP and QNET  
Armin,

ZeroMQ does look good and I have looked into using it before, but our
app is rather tied to Boost::asio. We make extensive use of the 
asynchronous call back mechanisms.

Have you seen any adaptations of asio to use ZeroMQ as the underlying
comms?

> the middleware ZeroMQ ( http://www.zeromq.org ) could be an alternative 
> to fiddeling around with io-pkt ...

-- Mike
Re: Application interface to io-pkt for TCP and QNET  
Mike,

Mike Robins wrote:
> Armin,
>
> ZeroMQ does look good and I have looked into using it before, but our
> app is rather tied to Boost::asio. We make extensive use of the
> asynchronous call back mechanisms.
>
> Have you seen any adaptations of asio to use ZeroMQ as the underlying
> comms?

   Both systems are written in C++ so it could be possible that someone 
has done that.
   But you should post this question in the 0MQ mailing list ...

--Armin


>> the middleware ZeroMQ ( http://www.zeromq.org ) could be an alternative
>> to fiddeling around with io-pkt ...
> -- Mike
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post79701
>
>
Re: Application interface to io-pkt for TCP and QNET  
After further research I have found an online book 

    "The Boost C++ Libraries" 
    by Boris Schaling 
    translated by Andreas Masur 
    published on en.highscore.de

that has a good section on extending the asio library

    http://en.highscore.de/cpp/boost/asio.html#asio_extensions

Using the information presented in the book and asio library documentation,
it would be feasible to implement asio service and io_objects to integrate 
zmq into the asio framework. ref: asio.sourceforge.net and boost.org

Mike