Nikita made a good library [net.async/async "0.1.0"] for asynchronous network communication.
https://github.com/tonsky/net.async
Just add this to your project.clj
Here is an output of example below:
-------------------------------
server: 4263
client: ECHO/4263
-------------------------------
server: 16640
client: ECHO/16640
-------------------------------
server: 75968
client: ECHO/75968
-------------------------------
server: 11092
client: ECHO/11092
-------------------------------
server: 61707
client: ECHO/61707
-------------------------------
server: 50773
client: ECHO/50773
-------------------------------
server: 16803
client: ECHO/16803
-------------------------------
Here is a source code of echo server and client:
https://github.com/tonsky/net.async
Just add this to your project.clj
Here is an output of example below:
-------------------------------
server: 4263
client: ECHO/4263
-------------------------------
server: 16640
client: ECHO/16640
-------------------------------
server: 75968
client: ECHO/75968
-------------------------------
server: 11092
client: ECHO/11092
-------------------------------
server: 61707
client: ECHO/61707
-------------------------------
server: 50773
client: ECHO/50773
-------------------------------
server: 16803
client: ECHO/16803
-------------------------------
Here is a source code of echo server and client:
Комментариев нет:
Отправить комментарий