Amazing Essay

839 WordsJan 24, 20134 Pages
Announcement • Lectures moved to • 150 GSPP, public policy building, right opposite Cory Hall on Hearst. • Effective Jan 31 i.e. next Tuesday Socket Programming Nikhil Shetty GSI, EECS122 Spring 2006 1 Outline • • • • APIs – Motivation Sockets Java Socket classes Tips for programming What is an API? • API – stands for Application Programming Interface 2 What is an API? • API – stands for Application Programming Interface. • Interface to what? – In our case, it is an interface to use the network. What is an API? • API – stands for Application Programming Interface. • Interface to what? – In our case, it is an interface to use the network. • A connection to the transport layer. 3 What is an API? • API – stands for Application Programming Interface. • Interface to what? – In our case, it is an interface to use the network. • A connection to the transport layer. • WHY DO WE NEED IT? Need for API • One Word - Layering • Functions at transport layer and below very complex. • E.g. Imagine having to worry about errors on the wireless link and signals to be sent on the radio. 4 APPLICATION API TRANSPORT NETWORK LINK PHYSICAL Layering Diagramatically Application API System Calls LAN Card Radio 5 What is a socket then? • What is a socket? Introduction • What is a socket? • It is an abstraction that is provided to an application programmer to send or receive data to another process. 6 Introduction • What is a socket? • It is an abstraction that is provided to an application programmer to send or receive data to another process. • Data can be sent to or received from another process running on the same machine or a different machine. Socket – An Abstraction Adapted from http://www.troubleshooters.com/codecorn/sockets/ 7 Sockets • • • • It is like an endpoint of a connection Exists on

More about Amazing Essay

Open Document