Up / djb-netstrings-ruby-0.1.0.tar.gz
djb-netstrings-ruby is Ruby implementation of Netstrings protocol. See D. J. Bernstein's Netstrings protocol specification: http://cr.yp.to/proto/netstrings.txt
Load "djb-netstrings", and DjbNetstrings module is provided. See unittest/test-netstrings.rb for sample.
DjbNetstrings.ns_pack(str)Packs data str to a netstring.
DjbNetstrings.ns_unpack(packed)Unpack data from a netstring packed.
DjbNetstrings.ns_read(io, limit = nil)Retrieves data by reading netstring from io. If limit is given, fails if data's length exceeds limit bytes.
DjbNetstrings.ns_write(io, str)Packs str to netstring and sends to io.
This program is free software distributed under BSD-style license term described in file COPYING.
Copyright 2003-, Shirai,Kaoru <shirai@korinkan.co.jp>