TCP/IP Part II
Topics
Issues in Client
Programming
Identifying the Server
Identifying a TCP/IP
server.
Services and Ports
Specifying a Local
Address
Local IP address
UDP Client Design
Connected mode UDP
TCP Client Design
Closing a TCP socket
Partial Close
TCP sockets programming
TCP Reads
Server Design
Concurrent vs. Iterative
Connectionless vs.
Connection-Oriented
Statelessness
The Dangers of
Statefullness
Concurrent
Server
Design Alternatives
One child process per
client
One thread per client
Pre-forked Server
Pre-forked TCP Server
Sockets library vs.
system call
Pre-forking
Pre-threaded Server
What’s the best server
design for my application?
Server Design
"It's important to
know about..."
Socket Options
Option types
Read-Only Socket Options
Setting and Getting
option values
Some Generic Options
SO_BROADCAST
SO_DONTROUTE
SO_ERROR
SO_KEEPALIVE
SO_LINGER
SO_LINGER usage
shutdown() vs SO_LINGER
SO_RCVBUF
SO_SNDBUF
SO_REUSEADDR
SO_REUSEADDR
SO_TIMEOUT
IP Options (IPv4)
another TCP socket option
Out-of-Band Date
Out-of-Band Data
TCP OOB Data
Sending OOB Data
Receiving OOB Data
Socket Options Summary
The TELNET Protocol
TELNET vs. telnet
The TELNET Protocol
Network Virtual Terminal
Network Virtual Terminal
Negotiated Options
Negotiated Options
Option examples
Control Functions
Control Functions
More Control Functions
Command Structure
Looking for Commands
Command Codes
Playing with TELNET
Some TCP Servers you can
play with
telnet hostname port
telnet vs. TCP
FTP
File Transfer Protocol
FTP Objectives
(from RFC 959)
The FTP Model
Control and Data
Connections
Control Connection
Standard Connection Model
Alternative Connection
Model
Access Control Commands
Transfer Parameter
Commands
Service Commands
FTP Replies
FTP Reply Status Code
FTP Reply Status Code
Data Transfer Modes
RFC 959