Class: Net::NNTP::Quit

Inherits:
Request show all
Defined in:
lib/net/nntp/request.rb

Overview

RFC 3977

Generates a QUIT command. Important: after issuing QUIT to the server, the connection MUST be closed by the client after a ConnectionClosing Response has been received.

Usage Example

nntp = Net::NNTP.new
nntp.server = 'localhost'
nntp.connect
request = Quit.new
response = nntp.process(request)
if (ConnectionClosing === response)
  nntp.disconnect
end

Valid Response: ConnectionClosing

Instance Method Summary collapse

Methods inherited from Request

#capability, #command, #dotstuff, #msgid_or_range, #range, #valid_response?

Constructor Details

#initializeQuit

Returns a new instance of Quit.



243
244
245
# File 'lib/net/nntp/request.rb', line 243

def initialize
  super 'QUIT'
end