How to implement a bidirectional "mailbox service" over tcp?

Posted by igorgatis on Stack Overflow See other posts from Stack Overflow or by igorgatis
Published on 2010-03-26T02:32:47Z Indexed on 2010/03/26 2:43 UTC
Read the original article Hit count: 421

The idea is to allow to peer processes to exchange messages (packets) over tcp as much asynchronously as possible.

The way I'd like it to work is each process to have an outbox and an inbox. The send operation is just a push on the outbox. The receive operation is just a pop on the inbox. Underlying protocol would take care of the communication details.

Is there a way to implement such mechanism using a single TCP connection?

How would that be implemented using BSD sockets and modern OO Socket APIs (like Java or C# socket API)?

© Stack Overflow or respective owner

Related posts about asynchronous

Related posts about bidirectional