[nanomsg] First nanocat release

  • From: Paul Colomiets <paul@xxxxxxxxxxxxxx>
  • To: nanomsg@xxxxxxxxxxxxx
  • Date: Fri, 30 Aug 2013 22:21:07 +0300

Hi,

I'm exited to announce first release of nanocat, the command-line
interface for the nanomsg.

http://github.com/insollo/nanocat

Basic features:
* Supports all socket types and protocols supported by nanomsg
* Can send static data specified on the command-line or from file
* Can send messages/requests at a given interval
* Small and self-contained, no dependencies except libc and nanomsg
(and cmake for building)

It tested in linux for now only, but should work on any posix system.
Windows should support is trivial to implement, but I'll probably do
it later.

I really think that it must be included to the nanomsg codebase for
the following reasons:

1. It's first thing to play with to discover how patterns work

2. It's super useful tool for debugging and automation testing, so
should be on the machine of every developer

3. It would help to submit bug reports. Currently bug report should
contain both client and server code usually. But one of the sides may
be replaced by nanocat invocation.

4. It would be useful to add `--debug` argument to nanocat which would
print some internals of nanomsg (e.g. accepting/dropping connection,
protocol mismatch...), for which there is no (an never would be) an
API. It is very useful tool. (We use strace all the time but that is
more complex to use and not cross-platform).

5. It may be used to test nanomsg itself. I'm not sure about this one,
but I've found 8 bugs in nanomsg while testing nanocat (will recheck
and file issues for each later)

A similar example is a Curl library. Which maintains single source for
libcurl and curl command-line utility, but is usually split into three
binary packages "libcurl", "libcurl-dev" and "curl".

The discussing points of the nanocat itself are:

1. It currently doesn't echo anything by default. Should it? Which
format is preferred?

2. Should it install symlinks for each socket type by default? I would
say it should, because, writing:

  nn_push -l1234 -Dhello

is much easier than writing:

  nanocat --push --connect tcp://127.0.0.1:1234 -Dhello

But maybe there are reasons for not doing this?

Any thoughts?

-- 
Paul

Other related posts: