interpersonal communications l.
Skip this Video
Loading SlideShow in 5 Seconds..
Interpersonal Communications PowerPoint Presentation
Download Presentation
Interpersonal Communications

Loading in 2 Seconds...

play fullscreen
1 / 22

Interpersonal Communications - PowerPoint PPT Presentation

  • Uploaded on

Interpersonal Communications. My experience on campus Dr Knutson driving Experiment?

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'Interpersonal Communications' - kiaria

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
interpersonal communications
Interpersonal Communications
  • My experience on campus
  • Dr Knutson driving
  • Experiment?
  • “There is another responsibility correlated and even coexistent with … agency, which is too infrequently emphasized, and that is the effect not only of a person’s actions, but also of his thoughts. Man radiates what he is, and that radiation affects to a greater or lesser degree every person who comes within that radiation” David O. McKay (“Free Agency … The Gift Divine,” Improvement Era, Feb 1962, 87)
  • “Thoughts mold your features. Thoughts lift your soul hevenward or drag you toward hell … As nothing reveals character like the company we like and keep, so nothing foretells futurity like the thoughts over which we brood … To have the approval of your conscience when you are alone with your thoughts is like being in the company of true and loving friends. To merit your own self-respect gives strength to character. Conscience is the link that binds your soul to the spirit of God” David O. McKay (“Those Sculptors Called Thoughts and Ideals, “ Improvement Era, July 1960, 495).
  • Program that listens on a particular port and accepts connections for a protocol
  • Each protocol listens on a different port
  • A server is then created to interact with the client




example application remote login w telnet
Example Application: Remote Login w/ TELNET
  • Provides interactive access to computer from a remote site
  • Text-oriented interface
  • User
    • invokes client
    • specifies remote computer
  • Client
    • forms TCP connection to server
    • passes keystrokes over connection
    • displays output on screen
  • Defined in RFC 854
example application file transfer protocol ftp
Example Application: File Transfer Protocol (FTP)
  • Complete file copy
  • Uses TCP
  • Supports binary or text file transfers
  • Large set of commands
  • Until 1995, it was the major source of packets on the Internet
  • Defined in RFC 959
example application world wide web www
Example Application: World Wide Web (WWW)
  • Web pages
    • can contain text, images, imbedded objects and links
    • standard authoring format is HTML
    • links use URL tags
    • transferred using HTTP
  • See for all the details
hypertext markup language
HyperText Markup Language
  • Document is free-format
  • Embedded tags give display format
  • Tags (often appear in pairs)
    • Paragraph <P> and </P>
    • Line break <BR>
    • Headings <H1>, <H2>
    • <IMG src=“jtk.jpg” border=“0”>
    • <A href=“”>DePaul</A>
uniform resource locator url
Uniform Resource Locator (URL)
  • Symbolic representation
  • Embedded in HTML document
  • Browser
    • hides text of link from user
    • associates link with item on page
    • makes items selectable
urls illustrated
URLs Illustrated

(http :// /index.html)

hypertext transfer protocol http
HyperText Transfer Protocol (HTTP)
  • Web server makes web pages available
  • Server uses port 80 by default
  • Web client (browser) requests pages
  • Creates a TCP connection to server
  • HTTP sits on top of TCP
  • HTTP v1.1 defined in RFC 2068
    • major enhancement over v1.0: single TCP connection for multiple HTTP requests
http lab
  • Write a HTTP Daemon (web server)
  • Connect with netscape to your server
  • Retreive gif, txt, html files
  • Run CGI scripts
http protocol
HTTP Protocol
  • Web browser receives a url
    • http://hostname:port/pathname
  • Web browser connects to hostname and sends pathname in a HTTP request over to socket
    • GET /pathname HTTP/1.0
  • Web server responds with contents of file or error page

telnet 80

GET /foo.html

HTTP/0.9 404

Server: Apache/1.3.3 Ben-SSL/1.29 (Unix) PHP/3.0.7

Content-type: text/html


<BODY bgcolor=FFFFFF><H1><img alt=""


The requested URL:<code>/foo.html</code> was not found on this server.


HTTP/1.0 200 OK

Attribute: value

Attribute: value

Attribute: value...

file data ...

TIP: use \r\n on the end of every line. Different browsers are picky about this and there are no real error messages if the browser doesn’t like your format

write(sock, "HTTP/1.0 200 OK\r\n", strlen ("HTTP/1.0 200 OK\r\n"));

  • Status
    • 200 OK means that the request was completed successfully
    • 404 is an error that will usually be followed by html describing the problem
  • The attributes tell the browser how to display the content
    • Content-Type:<CONTENT TYPE><CRLF>
      • Text: text/plain
      • Html: text/html
      • GIF: image/gif
      • JPEG: image/jpeg
    • Content-Length:<file-length in bytes><CRLF>
    • Some browsers ignore this and figure it out on their own.

The browser opens a socket connection to tape on port 1234. Your code should be listening on this port. The browser will then send the following request to your code.

GET /bungo.html

Followed by a bunch of information about the version and capabilities of the browser (this is how can charge you different prices depending on where you connect from).

You should then respond with the contents of the file bungo.html if you can find the file

  • If the file exists, send it immediately after the Content-type attribute
  • If it doesn’t exist, send html with an error message and the 404 status
  • If it is a directory
    • If there is a index.html file, send it
    • Otherwise, send a listing of the directory
      • system(“ls pathname > file”); then send file
      • fd=popen (“ls pathname”); then read from fd

Is converted to

GET <path>/<cgi-script>?query=<query text>+<param>|+<param>|+...

GET /test6.cgi?query=teststring

Your server should put the query string into an environment variable called QUERY_STRING, set up the environment variables REQUEST_METHOD and SERVER_PORT

Execute the command (perl script)

Capture the output and send it back on the socket

code sample
Code Sample

main(){char *cmd = "/usr/bin/ls *.c";char buf[BUFSIZ];FILE *ptr;if ((ptr = popen(cmd, "r")) != NULL) while (fgets(buf, BUFSIZ, ptr) != NULL) (void) printf("%s", buf); return 0;}

environment variables
Environment Variables

/*Create the environmental variables*/sprintf(query_dest,"QUERY_STRING=%s",query);sprintf(content,"CONTENT_LENGTH=%s",length);sprintf(shell_cmd,"%s > %s",filename,handle);putenv("REQUEST_METHOD=GET");putenv(content);putenv(query_dest);