Skip to content

Instantly share code, notes, and snippets.

@zph
Created January 13, 2013 05:32
Show Gist options
  • Save zph/4522491 to your computer and use it in GitHub Desktop.
Save zph/4522491 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'net/nntp'
# Environment: ruby-1.9.3-p286/bin/ruby
# ruby-net-nntp (1.0.0)
nntp = Net::NNTP.new
nntp.host = 'localhost' # also default
nntp.port = 119 # default port
welcome = nntp.connect
puts welcome
OKResponse === welcome
# set mode reader
request = Net::NNTP::Modereader
response = nntp.process(request)
puts response
@zph
Copy link
Author

zph commented Jan 13, 2013

Demo per conversation in #ruby.

No promise of being valid code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment