Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Clojure socket library. Utility functions to make working with sockets easier.
Clojure
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src/pocket
test/pocket
.gitignore
README.md
project.clj

README.md

Pocket

A library for making socket programming easier. Pocket is a small wrapper over Java sockets.

Usage

[pocket "0.1.0-SNAPSHOT"]

Examples

(use [pocket.core :as skt])

;; Create a new socket

(def s (skt/socket "time-A.timefreq.bldrdoc.gov", 13)

(skt/read-n s 2) ;; Read from the socket 2 times

;; -> "56233 12-11-02 08:13:57 03 0 0 171.2 UTC(NIST) * "

(skt/close-socket (:skt @s)) ;; Close the socket connection

License

Copyright © 2012 Owain Lewis

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

Something went wrong with that request. Please try again.