NOTE: Using software to mass-download the site degrades the server and is prohibited.
If you want to read The TCP/IP Guide offline, please consider licensing it. Thank you.

The Book is Here... and Now On Sale!

Read offline with no ads or diagram watermarks!
The TCP/IP Guide

Google
Web TCP/IP Guide






Table Of Contents  The TCP/IP Guide
 9  TCP/IP Application Layer Protocols, Services and Applications (OSI Layers 5, 6 and 7)
      9  TCP/IP Key Applications and Application Protocols
           9  TCP/IP File and Message Transfer Applications and Protocols (FTP, TFTP, Electronic Mail, USENET, HTTP/WWW, Gopher)

Previous Topic/Section
HTTP State Management Using "Cookies"
Previous Page
Pages in Current Topic/Section
1
2
34
Next Page
TCP/IP Interactive and Remote Application Protocols
Next Topic/Section

Gopher Protocol (Gopher)
(Page 2 of 4)

Gopher Client/Server Operation

Typical use of Gopher begins with a user on a client machine creating a TCP connection to a Gopher server using well-known TCP port number 70. After the connection is established, the server waits for the client to request a particular resource by sending the server a piece of text called a selector string. Often, when a user first accesses a server, he or she does not know what resource to request, so a null (empty) selector string is sent. This causes the server to send back to the client a list of the resources available at the top (root) directory of the server’s file system tree.

Directory Listing Structure

A directory list sent by the server consists of a set of lines, each of which describes one available resource in that directory. Each line contains the following elements, each of which is separated by a “<Tab>” character:

  • Type Character and Resource Name: The first character of the line tells the client software what sort of resource the line represents. The most common type characters are “0” for a file, “1” for a subdirectory and “7” for a search service. The rest of the characters up to the first “<Tab>” contain the name of the resource to be presented to the user.

  • Selector String: The string of text to be sent to the server to retrieve this resource.

  • Server Name: The name of the server where the resource is located.

  • Server Port Number: The port number to be used for accessing this resource’s server; normally 70.

Each line ends with a “<CR><LF>” character sequence consistent with the Telnet Network Virtual Terminal (NVT) specification. Upon sending the directory listing (or any other response) the connection between the client and server is closed.


Previous Topic/Section
HTTP State Management Using "Cookies"
Previous Page
Pages in Current Topic/Section
1
2
34
Next Page
TCP/IP Interactive and Remote Application Protocols
Next Topic/Section

If you find The TCP/IP Guide useful, please consider making a small Paypal donation to help the site, using one of the buttons below. You can also donate a custom amount using the far right button (not less than $1 please, or PayPal gets most/all of your money!) In lieu of a larger donation, you may wish to consider purchasing a download license of The TCP/IP Guide. Thanks for your support!
Donate $2
Donate $5
Donate $10
Donate $20
Donate $30
Donate: $



Home - Table Of Contents - Contact Us

The TCP/IP Guide (http://www.TCPIPGuide.com)
Version 3.0 - Version Date: September 20, 2005

© Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.