class Net::NNTP::Socket

Defined in:

net/nntp/socket.cr

Constant Summary

CRLF = "\r\n"
DOUBLE_P = ".."
EOT = ".#{CRLF}"

Constructors

Instance Method Summary

Constructor Detail

def self.new(address : String, port : Int32 = 119, use_ssl : Bool = true, open_timeout : Int32 = 30, read_timeout : Int32 = 60, ssl_context : OpenSSL::SSL::Context::Client | Nil = nil) #

[View source]

Instance Method Detail

def <<(val) #

[View source]
def address : String #

The address of the NNTP server to connect to.


[View source]
def close #

[View source]
def closed? #

[View source]
def flush #

[View source]
def gets(**args) #

[View source]
def open #

[View source]
def open_timeout : Int32 #

Seconds to wait while attempting to open a connection. If the connection cannot be opened within this time, a TimeoutError is raised.


[View source]
def open_timeout=(open_timeout : Int32) #

Seconds to wait while attempting to open a connection. If the connection cannot be opened within this time, a TimeoutError is raised.


[View source]
def port : Int32 #

The port number of the NNTP server to connect to.


[View source]
def read_timeout : Int32 #

Seconds to wait while reading one block (by one read(2) call). If the read(2) call does not complete within this time, a TimeoutError is raised.


[View source]
def recv_response : Net::NNTP::Response #

[View source]
def recv_response_text(resp) #

[View source]
def response_text_buffer : Array(String) #

[View source]
def send(fmt, *args, quiet = false) #

[View source]
def socket : TCPSocket | OpenSSL::SSL::Socket::Client #

[View source]
def ssl_context : OpenSSL::SSL::Context::Client #

[View source]
def ssl_context=(ssl_context : OpenSSL::SSL::Context::Client) #

[View source]
def ssl_socket : OpenSSL::SSL::Socket::Client | Nil #

[View source]
def ssl_socket=(ssl_socket : OpenSSL::SSL::Socket::Client | Nil) #

[View source]
def tcp_socket : TCPSocket | Nil #

[View source]
def tcp_socket=(tcp_socket : TCPSocket | Nil) #

[View source]
def use_ssl : Bool #

[View source]
def use_ssl=(use_ssl : Bool) #

[View source]