[zeromq-dev] [crossroads-dev] XS over serial port

Thomas Taranowski tom at baringforge.com
Fri May 25 23:43:48 CEST 2012

On Thu, May 17, 2012 at 4:58 AM, Martin Sustrik <sustrik at 250bpm.com> wrote:
> -- Attachment links are at the end of this email --
> On 17/05/12 12:37, Martin Lucina wrote:
>> sustrik at 250bpm.com said:
>>> Btw, Should we call it "serial port transport" ("serial://" or
>>> "rs232://") or "character device transport" ("tty://" or similar)?
>> serial:// or tty:// if you want to be cute, RS232 is only one particular
>> kind of serial port.  Also, be aware that the port settings (baud rate,
>> stop bits, flow control, etc.) will need to be passed
> Ok. Attached is a patch that adds scaffolding for tty:// transport.
> Thomas, apply the patch to current libxs trunk and check src/tty_engine.cpp
> There are 4 TODOs in the file:
> 1. Opening the communication channel
> 2. Closing the communication channel
> 3. Writing data to the channel
> 4. Reading data from the channel
> When you replace these placeholders by actual code, the tty transport
> should start working.
> Martin
> Crossroads Development now contains the following file
>    http://groups.crossroads.io/r/file/31284-2012-05-17T115808Z
>    Name: 0001-Scaffolding-for-tty-transport-added.patch
>    Type: text/x-patch
>    Size: 13KB

Thanks for the patch Martin.  I am working on pulling this over into
the zmq fold, and it's pretty clean with one snag.  I notice that the
codecs(decoder_t, encoder_t) for crossroads take a session instance,
while zmq takes an inout.  While zmq has a session, it's not been
pushed into the codec interfaces.

My question:
Should I look at adding support to the codecs for taking a session
instance, or should I stick with the current inout interface?

For the time being I modified the tty_engine to use inout, rather than
codecs, but it's not clear to me yet which path is more consistent
with plan for zmq.


More information about the zeromq-dev mailing list