Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cymen/clojure-netty
Basic example of using netty with Clojure
https://github.com/cymen/clojure-netty
Last synced: about 2 months ago
JSON representation
Basic example of using netty with Clojure
- Host: GitHub
- URL: https://github.com/cymen/clojure-netty
- Owner: cymen
- Created: 2012-03-12T19:58:26.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-03-22T13:50:50.000Z (over 11 years ago)
- Last Synced: 2024-06-24T04:35:36.622Z (3 months ago)
- Language: Clojure
- Homepage:
- Size: 101 KB
- Stars: 25
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# clojure-netty
Playing with netty in Clojure.## Usage
lein deps
lein run## Source origin
http://stackoverflow.com/questions/1735776/server-programming-with-clojure## Sending a message
The default port is 5000. You can telnet to localhost 5000 and send the
server a message which it will print to the server's console (so of course
open up two terminals). If 5000 doesn't work, start the server a second
time (while the first is still running) and you should get an error message
with the port number.Example:
/dev/clojure-netty cvig (master)$ telnet localhost 5000
Trying ::1...
Connected to localhost.
Escape character is '^]'.
StackOverflow is pretty cool
^]
telnet> quit
Connection closed.Server console:
/dev/clojure-netty cvig (master)$ lein run
#
Connected: # /0:0:0:0:0:0:0:1%0:5000]>
Message: StackOverflow is pretty cool
from # /0:0:0:0:0:0:0:1%0:5000]>
Disconnected: # /0:0:0:0:0:0:0:1%0:5000]>