This preview shows page 1. Sign up to view the full content.
Unformatted text preview: - keepalive, reuse, nodelay
fcntl() - async signals, blocking
ioctl() - file, socket, routing, interface options Blocking versus Non-blocking socket
Signal based socket programming (SIGIO)
Implementation specific functions SAS Institute Inc.
Cary, NC SAS/C & C++ Compiler R&D Slide 24
Feb. 1998 C Socket Programming Tutorial SHARE Session 5958 Design Considerations
U Data representation and conversion
Server design alternatives
Portability Considerations SAS Institute Inc.
Cary, NC SAS/C & C++ Compiler R&D Slide 25
Feb. 1998 C Socket Programming Tutorial SHARE Session 5958 Data Representation
U Transport Protocols detail data exchange/movement;
applications must interpret the data!
Byte order affects data - not just addresses
Text is often sent in ASCII, but ASCII versus EBCDIC is
decided by the application-level protocol
Structure alignment and floating point pose problems
External Data Representation (XDR) can be used (even
without RPC) SAS Institute Inc.
Cary, NC SAS/C & C++ Compiler R&D Slide 26
Feb. 1998 C Socket Programming Tutorial SHARE Session 5958 Server Design Alternatives
U Single Threaded
• more complex code (must track multiple concurrent requests)
• generally lower system overhead
• crash of thread disables service U Multi-Tasking
• less complex code (written only for handling only one connection)
• higher system overhead (each task requires it’s own process space)...
View Full Document
This document was uploaded on 02/14/2014.
- Summer '12