27.

Slides:



Advertisements
Similar presentations
1 Java Networking – Part I CS , Spring 2008/9.
Advertisements

CS3771 Today: network programming with sockets  Previous class: network structures, protocols  Next: network programming Sockets (low-level API) TODAY!
Leon-Garcia & Widjaja: Communication Networks Copyright ©2000 The McGraw Hill Companies The user clicks on a link to indicate which document is to be retrieved.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Application Layer PART VI.
Client Server Model The client machine (or the client process) makes the request for some resource or service, and the server machine (the server process)
ISP – 9 th Recitation Socket programming – Client side.
I NTRODUCTION OF S OCKET P ROGRAMMING L.Aseel AlTurki King Saud University.
Socket Programming -What is it ? -Why bother ?. Basic Interface for programming networks at transport level It is communication end point Used for inter.
Chapter 17 Networking Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William Stallings.
 TCP/IP is the communication protocol for the Internet  TCP/IP defines how electronic devices should be connected to the Internet, and how data should.
1 ELEN602 Lecture 2 Review of Last Lecture Layering.
Introduction to Networking and TCP/IP J. H. Wang Jun. 8, 2005.
IT COOKBOOK Windows Network Programming. Chapter 01. Intro. to Network and Socket Programming.
Jozef Goetz, Application Layer PART VI Jozef Goetz, Position of application layer The application layer enables the user, whether human.
Internet Applications and Network Programming Dr. Abraham Professor UTPA.
 TCP (Transport Control Protocol) is a connection-oriented protocol that provides a reliable flow of data between two computers.  TCP/IP Stack Application.
1 Introductory material. This module illustrates the interactions of the protocols of the TCP/IP protocol suite with the help of an example. The example.
Dr. John P. Abraham Professor University of Texas Pan American Internet Applications and Network Programming.
Remote Shell CS230 Project #4 Assigned : Due date :
Introduction to Sockets “A socket is one endpoint of a two-way communication link between two programs running on the network. A socket is bound to a port.
Networking Tutorial Special Interest Group for Software Engineering Luke Rajlich.
CS 158A1 1.4 Implementing Network Software Phenomenal success of the Internet: – Computer # connected doubled every year since 1981, now approaching 200.
1 Computer Networks An Introduction to Computer Networks University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani Lecture 3: Sockets.
TELE202 Lecture 15 Socket programming 1 Lecturer Dr Z. Huang Overview ¥Last Lecture »TCP/UDP (2) »Source: chapter 17 ¥This Lecture »Socket programming.
Chapter 27 Socket API Interface The interface between an application program and the communication protocols in an operating system is known as the Application.
Socket Programming Introduction. Socket Definition A network socket is one endpoint in a two-way communication flow between two programs running over.
Socket Programming.
2: Application Layer1 Chapter 2: Application layer r 2.1 Principles of network applications r 2.2 Web and HTTP r 2.3 FTP r 2.4 Electronic Mail  SMTP,
Advanced UNIX programming Fall 2002, lecture 16 Instructor: Ashok Srinivasan Acknowledgements: The syllabus and power point presentations are modified.
Network Programming By J. H. Wang Nov. 21, Outline Introduction to network programming Socket programming –BSD Socket –WinSock –Java Socket Exercises.
Berkeley Socket Abstraction
Transmission Control Protocol (TCP) Internet Protocol (IP)
TCP/IP Protocol Suite ©Richard L. Goldman September 25, 2002.
1 Network Communications A Brief Introduction. 2 Network Communications.
1 K. Salah Application Layer Module K. Salah Network layer duties.
SOCKET PROGRAMMING Presented By : Divya Sharma.
Application Layer Functionality and Protocols Abdul Hadi Alaidi
UDP Socket Programming
Introduction to Networks
The Transport Layer Implementation Services Functions Protocols
Networking Based Applications
Sockets and Beginning Network Programming
Lecture 10 Networking.
Jim Fawcett CSE 681 – Software Modeling & Analysis Fall 2002
MCA – 405 Elective –I (A) Java Programming & Technology
Jim Fawcett CSE 687-OnLine – Object Oriented Design Summer 2017
Some bits on how it works
Lecture 6: TCP/IP Networking By: Adal Alashban
Jim Fawcett CSE 775 – Distributed Objects Spring 2007
Working at a Small-to-Medium Business or ISP – Chapter 7
Network Architecture Introductory material
TCP/IP Networking An Example
Introduction to Networks
Working at a Small-to-Medium Business or ISP – Chapter 7
Working at a Small-to-Medium Business or ISP – Chapter 7
Interacting With Protocol Software
Transport layer API: Socket Programming
Review of Important Networking Concepts
TCP/IP Networking An Example
Working at a Small-to-Medium Business or ISP – Chapter 7
Transport Protocols An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
Lecture 6: TCP/IP Networking 1nd semester By: Adal ALashban.
Starting TCP Connection – A High Level View
Chapter 2 Application Layer
Internet Applications & Programming
Windows sockets Iveta LenčiauskaitE.
Process-to-Process Delivery: UDP, TCP
Computer Networks Protocols
The TCP/IP Model.
Jim Fawcett CSE 681 – Software Modeling & Analysis Summer 2003
Presentation transcript:

27

Review of Last Lecture Thread synchronisation Kernel Objects: Synchronisation Objects

Introduction to Network Programming Concept of a packet of information IP addresses and ports The structure of an IP packet What is a protocol? Connection-oriented vs. datagram protocols IP, TCP and UDP HTTP, other wrapper protocols

Well-known port numbers 80 http 25 SMTP 110 POP3 43 WHOIS 53 DNS 21 FTP

Introduction to Network Programming DNS: Domain Name System example http://www.vu.edu.pk/ could be http:// 58.27.140.133 / Hostnames of machines Address resolution: ARP and RARP

Well-known hostnames on the internet www.vu.edu.pk 203.215.177.33 www.yahoo.com 64.58.76.179 www.most.gov.pk 66.96.232.41 www.pak.gov.pk 66.197.42.253 www.google.com 216.239.53.100 www.whois.net 128.121.95.59

Windows Sockets An object that represents an endpoint for communication between processes across a network transport. Sockets have a datagram or stream type and can be bound to a specific network address. Windows Sockets provides an application programming interface (API) for handling all types of socket connections in Windows. The BSD sockets on UNIX Concept of client and server

Windows Sockets: HTTP Web browser as an HTTP client application What is HTTP? Structure of URL: protocol, hostname, document name http://www.vu.edu.pk/default.htm

Basic socket operations Create an unbound socket Server Client bind connect listen accept send receive receive send

Windows Sockets Library File Purpose ws2_32.dll Main WinSock 2 DLL wsock32.dll For WinSock 1.1 support, 32-bit applications mswsock.dll MS extensions to WinSock winsock.dll For WinSock 1.1 support, 16-bit applications ws2help.dll WinSock2 helper ws2tcpip.dll WinSock 2 helper for TCP/IP stacks

Initialise WinSock int WSAStartup( WORD wVersionRequested, LPWSADATA lpWSAData ); WinSock version: high-order byte specifies the minor version (revision) number; the low-order byte specifies the major version number.

The socket descriptor: SOCKET is in fact, a simple 2-byte integer Initialise WinSock SOCKET socket( int af, int type, SOCK_STREAM, SOCK_DGRAM int protocol IPROTO_TCP, IPROTO_IP ); The socket descriptor: SOCKET is in fact, a simple 2-byte integer