Skip to content

wavejumper/tcp-server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TCP-Server

A Clojure library for creating TCP servers. Similar in scope to the clojure.contrib.server-socket library, but without the baggage of having to depend on Clojure-Contrib.

Usage

This will create a small server that sends "Hello World" to any connecting client, then closes the connection.

(use 'net.tcp.server)

(defn handler [reader writer]
  (.append writer "Hello World"))

(def server
  (tcp-server 
    :port    5000
    :handler (wrap-io handler)))

(start server)

License

Copyright (C) 2011 FIXME

Distributed under the Eclipse Public License, the same as Clojure.

About

Clojure TCP server library

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Clojure 100.0%