1 Pertemuan 9 Windows Socket ( WinSock ) Matakuliah: H0483 – Network Programming Tahun: 2008 Versi: 2.0.

Slides:



Advertisements
Similar presentations
Socket Programming 101 Vivek Ramachandran.
Advertisements

Sockets Programming Network API Socket Structures Socket Functions
Computer Net Lab/Praktikum Datenverarbeitung 2 1 Overview Sockets Sockets in C Sockets in Delphi.
MERANCANG Program Transfer File (PTF) PTFServer dan PTFClient I Made Astawa
Taekyung Kim 0x410 ~ 0x International Standards Organization (ISO) is a multinational body dedicated to worldwide agreement on international.
Pertemuan 13 Threads Matakuliah: H0483 / Network Programming Tahun: 2005 Versi: 1.0.
1 Pertemuan 15 Layer Data Link Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0.
1 Pertemuan 16 First & Second Conditionals Matakuliah: G0134 – Grammar III Tahun: 2005 Versi: revisi 1.
1 Pertemuan 19 Disk Matakuliah: T0316/sistem Operasi Tahun: 2005 Versi/Revisi: 5 OFFCLASS03.
1 Pertemuan 3: TRAVELING THROUGH TIME ZONES Matakuliah: G0942/Listening 1 Tahun: 2009 Versi: baru.
1 Pertemuan 12 Binary Search Tree Matakuliah: T0026/Struktur Data Tahun: 2005 Versi: 1/1.
1 Pertemuan 04 Proxy/Cache Matakuliah: H0491/Praktikum Jaringan Komputer Tahun: 2005 Versi: 1/0.
Pertemuan <<12>> Paralel dan Basis Data Terdistribusi
1 Pertemuan 22 Radix Sort Matakuliah: T0016/Algoritma dan Pemrograman Tahun: 2005 Versi: versi 2.
1 Pertemuan 6 Elementary UDP Sockets Matakuliah: H0483 / Network Programming Tahun: 2005 Versi: 1.0.
Dynamic SQL Pertemuan 11 Matakuliah: T0413/Current Popular IT II Tahun: 2007.
12 - Organisation Matakuliah: G0622/Bahasa Inggris 1 Tahun: 2005 Versi: 1.01.
1 Pertemuan 10 Arsitektur Jaringan Model OSI Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0.
CS335 Networking & Network Administration Tuesday, May 25, 2010.
1 Pertemuan 23 Object database design (Lanjutan bagian 2) Matakuliah: M0174/OBJECT ORIENTED DATABASE Tahun: 2005 Versi: 1/0.
1 Pertemuan 24 Sistem Operasi Unix Matakuliah: T0316/sistem Operasi Tahun: 2005 Versi/Revisi: 5.
1 Pertemuan 10 Non Blocking Matakuliah: H0483 / Network Programming Tahun: 2005 Versi: 1.0.
1 Pertemuan 03 Routing Matakuliah: H0451/Praktikum Jaringan Komputer Tahun: 2006 Versi: 1/0.
1 Pertemuan 02 LAN Matakuliah: H0451/Praktikum Jaringan Komputer Tahun: 2006 Versi: 1/0.
1 Pertemuan 8 Penjadwalan (lanjutan) Matakuliah: T0316/sistem Operasi Tahun: 2005 Versi/Revisi: 5.
1 Generic Transport Service Primitives Listen –notify Transport layer a call is expected Connect –establish Transport layer connection Send (or Write)
07 - Advertising Matakuliah: G0622/Bahasa Inggris 1 Tahun: 2005 Versi: 1.01.
03 - Globalisation Matakuliah: G0622/Bahasa Inggris 1 Tahun: 2005 Versi: 1.01.
1 Pertemuan 21 Audit Reporting Matakuliah:A0274/Pengelolaan Fungsi Audit Sistem Informasi Tahun: 2005 Versi: 1/1.
1 Pertemuan 05 Selection Matakuliah: D0524 / Algoritma dan Pemrograman Komputer Tahun: 2005 Versi:
1 Pertemuan 11 Manajemen Memori Matakuliah: T0316/sistem Operasi Tahun: 2005 Versi/Revisi: 5 OFFCLASS02.
1 Pertemuan 11 QUIZ Matakuliah: J0274/Akuntansi Manajemen Tahun: 2005 Versi: 01/00.
1 Pertemuan 02 Visual Basic Environment and Control Matakuliah: D0524 / Algoritma dan Pemrograman Komputer Tahun: 2005 Versi:
Pertemuan 20 Character oriented terminal
1 Pertemuan 20 Time & Condition Clauses with Future reference Matakuliah: G0134 – Grammar III Tahun: 2005 Versi: revisi 1.
1 Pertemuan 09 Database Matakuliah: D0524 / Algoritma dan Pemrograman Komputer Tahun: 2005 Versi:
1 Pertemuan 3: TRAVELING THROUGH TIME ZONES Matakuliah: G0942/Listening 1 Tahun: 2005 Versi: baru.
1 Pertemuan 18 I wish, If only Matakuliah: G0134 – Grammar III Tahun: 2005 Versi: revisi 1.
1 Pertemuan 7 The Object Definition Language Matakuliah: M0174/OBJECT ORIENTED DATABASE Tahun: 2005 Versi: 1/0.
1 Pertemuan 5 Bisnis Proses Matakuliah: H0472 / Konsep Sistem Informasi Tahun: 2006 Versi: 1.
1 Pertemuan #3 Clocks and Realtime Matakuliah: H0232/Sistem Waktu Nyata Tahun: 2005 Versi: 1/5.
1 Pertemuan 14 Phrases of agreement Matakuliah: G0134/Grammar III Tahun: 2005 Versi: revisi 1.
1 Pertemuan 06 Repetition Matakuliah: D0524 / Algoritma dan Pemrograman Komputer Tahun: 2005 Versi:
1 Pertemuan 19 Building Object Database Application (Lanjutan bagian 2) Matakuliah: M0174/OBJECT ORIENTED DATABASE Tahun: 2005 Versi: 1/0.
1 Pertemuan 8 The Object Definition Language (Lanjutan) Matakuliah: M0174/OBJECT ORIENTED DATABASE Tahun: 2005 Versi: 1/0.
Client Software Design Objectives: Understand principles of C/S design, with focus on clients Review Windows implementations of Socket functions.
Socket Programming References: redKlyde ’ s tutorial set Winsock2 for games (gamedev.net)
Hands On Networking Socket Programming Ram P Rustagi, ISE Dept Abhishek Gupta, ISE Dept Laxmi Kuber, MCA Dept June 28-30, 2012.
DSock – DOS TCP/IP by ICOP / DMP Group DSock – DOS TCP/IP by ICOP / DMP Group.
Sockets The Standard Network Programming API Agenda Evolution Evolution API Components (Sockets/Winsock) API Components (Sockets/Winsock) Protocol Configuration.
Sockets API Overview Sockets with UDP Sockets with TCP Fast Sockets (Fast UDP) IP Multicasting.
1 Pertemuan 3 Konsep Sistem Operasi Matakuliah: T0316/sistem Operasi Tahun: 2005 Versi/Revisi: 5.
Windows Network Programming ms-help://MS.MSDNQTR.2004JAN.1033/winsock/winsock/windows_sockets_start_page_2.htm 井民全.
Socket Models Different ways to manage your connections.
1 Pertemuan 5 Software: System Software Matakuliah: T0604-Pengantar Teknologi Informasi Tahun: 2008 Versi: 2.0/0.0 Williams, B.K, Stacy C. Sawyer (2007).
The Socket Interface Chapter 22. Introduction This chapter reviews one example of an Application Program Interface (API) which is the interface between.
1 WNT Low Level Network Interfaces Tutorial NT015 Copyright, 1997 ©Mentec Inc Paul Fix Mentec Inc.
Berkeley Socket Abstraction
Sockets A popular API for client-server interaction.
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.
Matakuliah : D0524 / Algoritma dan Pemrograman Komputer
Pertemuan 04 Proxy/Cache
Table Pertemuan 10 Matakuliah : L0182 / Web & Animation Design
Jim Fawcett CSE 681 – Software Modeling & Analysis Fall 2002
Pertemuan 20 Building Object Database Application (Lanjutan bagian 3)
Pertemuan 22 The Business Views of the Technology Architecture
Pertemuan 7 I/O Multiplexing
Pertemuan 11 Model TCP/IP
28.
Jim Fawcett CSE 681 – Software Modeling & Analysis Summer 2003
Presentation transcript:

1 Pertemuan 9 Windows Socket ( WinSock ) Matakuliah: H0483 – Network Programming Tahun: 2008 Versi: 2.0

2 Learning Outcomes Pada akhir pertemuan ini, diharapkan mahasiswa akan mampu : Mendemokan program aplikasi pada sistem operasi windows dengan menggunakan Windows Socket.

3 Outline Materi What is Socket ? What is Winsock ? The Socket History Winsock History Supported Programming Models Elements of Winsock Programming General Program Flow Iterative Server pada Windows Concurrent Server pada Windows

4 WinSock What is Socket? –Socket is is a programming model originally designed for network programming under UNIX operating systems. What is Winsock? –Winsock stands for Windows Socket; –An Application Programming Interface for network programming under the Microsoft Windows operating systems. –It is modeled after UNIX Socket but with platform-specific features added.

5 WinSock

6

7

8 Supported Programming Models –Synchronous Model –Asynchronous Model Synchronous Model –Makes use of blocking-mode I/O function calls. –What is Blocking I/O? Guaranteed either function completed successfully or failed upon function return The calling code has to wait (i.e. block) for the function to complete before continuing execution

9 WinSock Asynchronous Model –Makes use of non-blocking-mode I/O function calls. What is Non-Blocking I/O? –Guaranteed function will return immediately: –The calling code has to check if the function has completed before return. –If not, the calling code will have to handle that itself.(e.g. check at a later time, call the function again, wait for asynchronous event to trigger, etc.)

10 Elements of Winsock Programming

11 Elements of Winsock Programming BSD-Style Winsock Functions –Core functions accept, bind, closesocket, connect, listen, recv, recvfrom, select, send, sendto, Shutdown, socket –Auxiliary functions Getpeername, Getsockname, Getsockopt, ioctlsocket –Utility functions htonl, htons, inet_addr, inet_ntoa, ntohl, ntohs

12 Elements of Winsock Programming Windows-Specific Winsock Functions –Core functions WSAStartup, WSACleanup, WSAAsyncGettByn, WSAAsyncSelect, WSACancelAsyncRequest, WSAConnect,WSAIoctl, WSARecv, WSARecvFrom, WSASend, WSASendTo, WSASocket –Auxiliary functions WSADuplicateSocket, WSAEnumNetworkEvents, WSAEnumProtocols, WSAGetLastError, WSAGetQOSByName, WSAHtonl, WSAHtons, WSAJoinLeaf, WSANtohl, WSANtohs, WSAProviderConfigChange, WSASetLastError –Supporting functions WSACloseEvent, WSACreateEvent, WSAEventSelect, WSAGetOverlappedResult, WSAResetEvent, WSASetEvent, WSAWaitForMultipleEvents

13 General Program Flow

14 General Program Flow

15 General Program Flow

16 Online References References –The Winsock 1.1 and 2.0 Specifications –Winsock Resource Centre at –Windows socket programming resources at –Visual C++ On-Line Help and Programming Reference

17 Iterative Server pada Windows

18 Concurrent Server pada Windows

19 Concurrent Servers I/O Models for Concurrent Servers –Synchronous/Blocking Mode I/O Multi-threading (Win32 only) Similar to the UNIX fork( ) multiple-process model. –Asynchronous/Non-Blocking Mode I/O Message-driven (All Windows versions) Overlapped I/O (Win32 only) –Socket handle signalling –Windows event object signalling –I/O completion routines –I/O Completion Ports (Windows NT only)

20 Concurrent Server pada Windows

21 Concurrent Server pada Windows

22 Concurrent Server pada Windows

23 Concurrent Server pada Windows

24 Concurrent Server pada Windows

25 Latihan Buat Program Echo Server dan program client nya pada Windows dengan menggunakan Winsock. Bahasa Pemrograman yang digunakan bebas.