anchor.diff:    (:require [nanomsg :as nn]))
   ----
   
  +However, on java api, each protocol has it own package that contains a corresponding socket classes.
  +
  +
  +Connect/Bind
  +^^^^^^^^^^^^
  +
  +Clojure
  ++++++++
  +
  +With clojure, you have two ways a do this: creating a socket and connection or do the
  +two operations in one, using `socket!` function optional parameters.
  +
  +Example of connect/bind operation using two steps:
  +
  +._client.clj_
  +[source,clojure]
  +----
  +(let [s (nn/socket :req)]
  +  (nn/connect! s "tcp:///tmp/sock"))
  +----
  +
  +._server.clj_
  +[source,clojure]
  +----
  +(let [s (nn/socket :rep)]
  +  (nn/bind! s "tcp:///tmp/sock"))
  +----
  +
  +Example of connect/bind operation using a single step:
  +
  +._client.clj_
  +[source,clojure]
  +----
  +(nn/socket :req {:connect "tcp:///tmp/sock"})
  +----
  +
  +._server.clj_
  +[source,clojure]
  +----
  +(nn/socket :rep {:bind "tcp:///tmp/sock"})
  +----
  +
  +NOTE: On clojure, a socket types are represented by keywords. With this approach,
  +you can create any socket type with one unique function: `socket`. As you can see
  +on previous examples, I have used `:req` and `:rep` keywords for create respectively
  +_request_ and _reply_ socket types that are part of 
  +link:http://nanomsg.org/v0.2/nn_reqrep.7.html[Req/Rep protocol]
  +
  +
  +Java
  +++++
  +
  +With java, each socket class has it own connect/bind method.
  +
  +Here one example of how connect to a remote socket:
  +
  +._Client.java_
  +[source,java]
  +----
  +import nanomsg.reqrep.ReqSocket
  +
  +public class Client {
  +    public static void main(String[] args) {
  +        final ReqSocket s = new ReqSocket();
  +        s.connect("tcp:///tmp/sock");
  +    }
  +}
  +----
  +
  +And, here an example how to bind and listen on local socket:
  +
  +
  +._Server.java_
  +[source,java]
  +----
  +import nanomsg.reqrep.RepSocket
  +
  +public class Server {
  +    public static void main(String[] args) {
  +        final RepSocket s = new RepSocket();
  +        s.bind("tcp:///tmp/sock");
  +    }
  +}
  +----
  +
  +INFO: You can see in more detail a java api on link:api/java/index.html[javadoc].
  +
  +NOTE: With both languages, you can execute bind multiple times for listen 
  +in multiple socket locations.
  +
   
   Pub/Sub Sockets
   ~~~~~~~~~~~~~~~
  
positive.code: Introduction
  ------------
  
  link:http://nanomsg.org[nanomsg] is a socket library that provides common communication patterns.
  
  Install
  -------
  
negative.code: Java
  ^^^^
  
  Example of using pub/sub protocols in clojure:
  
  ._Publisher.java_
  [source,java]
  