Created
January 13, 2013 05:32
-
-
Save zph/4522491 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Demo per conversation in #ruby.
No promise of being valid code.