Chapter 5 & 6 UDP 서버/클라이언트 u-Network Design Lab 5.

Slides:



Advertisements
Similar presentations
Florida State UniversityCOP Advanced Unix Programming Raw Sockets Datalink Access Chapters 25, 26.
Advertisements

1 Pertemuan 6 Elementary UDP Sockets Matakuliah: H0483 / Network Programming Tahun: 2005 Versi: 1.0.
@2011 Mihail L. Sichitiu1 Android Introduction Hello Socket Programming TCP and UDP.
TCP Lightweight Agent Project Goal : Implementation of a generic agent that will be able to measure connection parameters between a client and a server.
1 Chapter 6 Datagram Delivery by UDP Just as the Internet Protocol uses the services of subnetworks, transport protocols build upon the services of IP.
UDP and Multi-thread Socket Programming
Elementary TCP Sockets Chapter 4 UNIX Network Programming Vol. 1, Second Ed. Stevens.
Sockets Basics Conectionless Protocol. Today IPC Sockets Basic functions Handed code Q & A.
A CHAT CLIENT-SERVER MODULE IN JAVA BY MAHTAB M HUSSAIN MAYANK MOHAN ISE 582 FALL 2003 PROJECT.
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.
VSP Video Station Protocol Presented by : Mittelman Dana Ben-Hamo Revital Ariel Tal Instructor : Sela Guy Presented by : Mittelman Dana Ben-Hamo Revital.
Julia Ljunbjörk and Anita Mugenyi. What is a socket? Like a house Between the layers.
Module 1: Reviewing the Suite of TCP/IP Protocols.
By: Joel Rodriguez.  International student from Mexico  Delicias, Chihuahua Mexico  Spanish  Sports and Music.
Hands On Networking Socket Programming Ram P Rustagi, ISE Dept Abhishek Gupta, ISE Dept Laxmi Kuber, MCA Dept June 28-30, 2012.
Network Programming Tutorial #9 CPSC 261. A socket is one end of a virtual communication channel Provides network connectivity to any other socket anywhere.
DEMIGUISE STORAGE An Anonymous File Storage System VIJAY KUMAR RAVI PRAGATHI SEGIREDDY COMP 512.
University of Calgary – CPSC 441.  UDP stands for User Datagram Protocol.  A protocol for the Transport Layer in the protocol Stack.  Alternative to.
Chapter 17 Networking Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William Stallings.
 Socket  The combination of an IP address and a port number. (RFC 793 original TCP specification)  The name of the Berkeley-derived application programming.
Outline Overview Video Format Conversion Connection with An authentication Streaming media Transferring media.
Vassil Roussev 2 A socket is the basic remote communication abstraction provided by the OS to processes. controlled by operating system.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 16 Socket Interface
Sockets API Overview Sockets with UDP Sockets with TCP Fast Sockets (Fast UDP) IP Multicasting.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 16 Socket Interface.
Chapter 2 Applications and Layered Architectures Sockets.
The Socket Interface Chapter 21. Application Program Interface (API) Interface used between application programs and TCP/IP protocols Interface used between.
Remote Shell CS230 Project #4 Assigned : Due date :
1 Figure 3-27: Use of TCP and UDP Port Number Client From: :50047 To: :80 SMTP Server Port 25 Webserver.
TFTP: Trivial file transfer protocol
CS 158A1 1.4 Implementing Network Software Phenomenal success of the Internet: – Computer # connected doubled every year since 1981, now approaching 200.
CPSC 441 TUTORIAL – FEB 13, 2012 TA: RUITNG ZHOU UDP REVIEW.
Client/Server Socket Programming Project
Socket Programming.
Advanced UNIX programming Fall 2002, lecture 16 Instructor: Ashok Srinivasan Acknowledgements: The syllabus and power point presentations are modified.
Today’s topic: UDP Reliable communication over UDP.
Berkeley Socket Abstraction
©The McGraw-Hill Companies, Inc., 2000© Adapted for use at JMU by Mohamed Aboutabl, 2003Mohamed Aboutabl1 1 Chapter 16 Socket Interface.
1 Dimension of Server Designs r Iterative vs Concurrent r Connection-oriented vs. connectionless r Stateful and stateless m Constrained by application.
Netprog: Client/Server Issues1 Issues in Client/Server Programming Refs: Chapter 27.
Socket programming in C. Socket programming Socket API introduced in BSD4.1 UNIX, 1981 explicitly created, used, released by apps client/server paradigm.
Mandatory Assignment INF3190. Part 1: Client-server communication via TCP Develop a client-server application in C which allows a client to send UNIX.
A Local Area Network Chat Client ITTC LAN CHAT John Vincent Cecogo Jerikho Daguno Ardee Santos Elaine Mendoza Anjomar Pat Del Mindo Philip John Sales Philip.
Department of Computer Science Southern Illinois University Edwardsville Spring, 2010 Dr. Hiroshi Fujinoki CS 547/490 Network.
1 K. Salah Application Layer Module K. Salah Network layer duties.
CLIENT (Browser) socket accept C1 C2 recv C2 recv send C2 send end_thread recv C3 send bind connect Web Server Proxy recv close C3 close C2 end_thread.
Powerpoint Templates Page 1 Powerpoint Templates CS Networks Laboratory HANDLED BY, A.MAHESH PRIYA L/IT.
SOCKET PROGRAMMING Presented By : Divya Sharma.
Socket Programming original by Joonbok Lee KAIST heavily adapted by /Jens.
1 Issues in Client/Server Refs: Chapter 27 Case Studies RFCs.
UDP Socket Programming
Chapter 3 Transport Layer
Chapter 3 Transport Layer
Client-Server Communication
Connecting an Enterprise Network to an ISP Network
CHAPTER 8 ELEMENTARY UDP SOCKETS
Hello Socket Programming TCP and UDP
The Transport Layer Socket Programming
Implementation CAN Communication Engine
UNIX Sockets Outline Homework #1 posted by end of day
Chapter 4 TCP 서버/클라이언트 u-Network Design Lab 3.
Programming in Java Text Books :
Chapter 16 Socket Interface.
Software Engineering for Internet Applications
Issues in Client/Server Programming
TA: Donghyun (David) Kim
Chapter 06. UDP Server/Client.
Chapter 5 멀티스레드 u-Network Design Lab 4.
Transport Layer 9/22/2019.
Presentation transcript:

Chapter 5 & 6 UDP 서버/클라이언트 u-Network Design Lab 5

Thread Synchronization Need Synchronization. Why ? Share variable Int Balance = 100 Thread 2 Thread 1 u-Network Design Write Write Balance = Balance + 10; Balance = Balance +40;

Question 1 Modify ExCriticalSection example to use Event as thread synchronization mechanism. Important Functions CreateEvent(…) BOOL SetEvent (HANDLE hEvent) Refer Text Book pg. 182-188 u-Network Design

Sample Output Question 1 Without Thread Synchronization With Thread Synchronization u-Network Design

UDP server/client structure socket() bind() recvfrom() sendto() closesocket() UDP server UDP client network u-Network Design

TCP vs UDP u-Network Design

TCP vs UDP TCP Frame UDP Frame Heavyweight Lightweight u-Network Design TCP Frame UDP Frame Heavyweight Lightweight

Question 2 Modify FileReceiver.cpp & FileSender.cpp to UDP base. [UDP Server] Client IP 192.168.94.109 is connected. [UDP Server] Client IP 192.168.94.109 is Sending file[test] 19 bytes. [UDP Server] Client IP 127.0.0.1 is connected. [UDP Server] Client IP 127.0.0.1 is Sending file[a.hwp] 123 bytes. [UDP Server] Client IP 192.168.94.109 sent file[test] successfully. [UDP Server] Client IP 127.0.0.1 sent file[a.hwp] successfully. u-Network Design

Question 3 Modify Lab4-Q3 to UDP base Write a simple TCP User Authentication Program with multi-threading using _beginthreadex() and _endthreadex(). Client sends username to server. Server replies the member’s status back to client. Modify Lab4-Q3 to UDP base Do you still need multi-threading ? u-Network Design

Sample Output Question 3 Enter your username: dongseo …..Checking your status……. ====================== Username: dongseo Status: Member Enter your username: thread Username: thread Your status: Admin Enter your username: udesign Username : udesign Your status: Non-member u-Network Design

Thank you u-Network Design