Книга: Linux Network Administrator Guide, Second Edition

Connecting to the News Server

Connecting to the News Server

Connecting to the news server is a simple as opening a TCP connection to its NNTP port. When you are connected, you will be greeted with a welcome banner. One of the first commands you might try is help. The response you get generally depends upon whether the server believes you are a remote NNTP server or a newsreader, as there are different command sets required. You can change your operating mode using the mode command; we'll look at that in a moment:

$ telnet news.vbrew.com nntp
Trying 172.16.1.1...
Connected to localhost.
Escape character is '^]'.
200 news.vbrew.com InterNetNews server INN 1.7.2 08-Dec-1997 ready
help
100 Legal commands
        authinfo
  help
  ihave
  check
    takethis
    list
    mode
    xmode
    quit
    head
    stat
    xbatch
    xpath
    xreplic
For more information, contact "usenet" at this machine.
.

The responses to NNTP commands always end with a period (.) on a line by itself. The numbers you see in the output listing are response codes and are used by the server to indicate success or failure of a command. The response codes are described in RFC-977; we'll talk about the most important ones as we proceed.

Оглавление книги


Генерация: 4.551. Запросов К БД/Cache: 3 / 0
поделиться
Вверх Вниз