Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Clojure socket library. Utility functions to make working with sockets easier.

tree: 106211905d

Fetching latest commit…

Cannot retrieve the latest commit at this time

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.