Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
52 lines (35 sloc) 1.34 KB


TODO: Write a gem description


Add this line to your application's Gemfile:

gem 'NNTPClient'

And then execute:

$ bundle

Or install it yourself as:

$ gem install NNTPClient



Two different methods can be used to connect to a usenet server:

  1. First, by supplying a URL and a port number as hash values:

    nntp = => '', :port => 119)

    An optional :socket_factory value can be included if you'd with for something other than TCPSocket to be used.
    Please note that the signature of ::new must match TCPSocket::new's signature.

  2. By supplying an existing socket:

my_socket ='', 119)
nntp = => my_socket)

Listing Newsgroups

Upon connecting to a server, a list of valid newsgroups may be retrieved as such:

groups = nntp.groups

The first time #groups is called, it retrieves the list of groups from the server. Subsequent calls return an instance variable.


  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request