142x Filetype PDF File size 0.16 MB Source: ftp.sas.com
C Socket Programming Tutorial SHARE Session 5959 Writing Client/Server Programs in C Writing Client/Server Programs in C Using Sockets (A Tutorial) Using Sockets (A Tutorial) Part II Part II Session 5959 Session 5959 Greg Granger Greg Granger grgran@sas.com grgran@sas.com SAS/C & C++ Support SAS/C & C++ Support SAS Institute SAS Institute Cary, NC Cary, NC SAS Institute Inc Slide 1 SAS Institute Inc SAS/C & C++ Compiler R&D Cary, NC Cary, NC Feb 1998 C Socket Programming Tutorial SHARE Session 5959 Remote Execution Sample Program Remote Execution Sample Program Remote Execution Connection Diagram Remote Execution Connection Diagram getservbyname() coding getservbyname() coding rexec() function declaration rexec() function declaration gethostbyname() and struct hostent gethostbyname() and struct hostent rexec() caller source code examination rexec() caller source code examination System call return conventions System call return conventions Socket address structures and conventions Socket address structures and conventions recv() and send() conventions recv() and send() conventions File descriptor sets and select() File descriptor sets and select() SAS Institute Inc Slide 2 SAS Institute Inc SAS/C & C++ Compiler R&D Cary, NC Cary, NC Feb 1998 C Socket Programming Tutorial SHARE Session 5959 Remote Execution Connection Diagram Remote Execution Connection Diagram Client issues: rexec server.unx mark mypass ls -l server.unx host.mvs server.unx host.mvsstdout Primary stdout Primary exec cmd Socket exec cmd rexeccmd Socket rexeccmd (ls -l) stdin (ls -l) rexec rexec stderr (pipe) stderr (pipe) Secondary Secondary Socket Socket rexecd rexecd SAS Institute Inc Slide 3 SAS Institute Inc SAS/C & C++ Compiler R&D Cary, NC Cary, NC Feb 1998 C Socket Programming Tutorial SHARE Session 5959 REXEC Initial Connection REXEC Initial Connection host.mvs server.unx host.mvs server.unx inetd rexeccmd inetd rexeccmd Primary rexec Primary rexec rexecd Socket rexecd Socket client issues: rexecd issues: issues: rexeccmd.c socket() [53] getservbyname() socket() bind() [60] rexec() bind() listen() rexec.c listen() select() [61] gethostbyname() select() accept() [70] socket() accept() [79] connect() SAS Institute Inc Slide 4 SAS Institute Inc SAS/C & C++ Compiler R&D Cary, NC Cary, NC Feb 1998
no reviews yet
Please Login to review.