Presentasi sedang didownload. Silahkan tunggu

Presentasi sedang didownload. Silahkan tunggu

PEMOGRAMAN BERBASIS JARINGAN. 2 Network Request Result a client, a server, and network Client Server Client machine Server machine Ilustrasi C-S Computing.

Presentasi serupa


Presentasi berjudul: "PEMOGRAMAN BERBASIS JARINGAN. 2 Network Request Result a client, a server, and network Client Server Client machine Server machine Ilustrasi C-S Computing."— Transcript presentasi:

1 PEMOGRAMAN BERBASIS JARINGAN

2 2 Network Request Result a client, a server, and network Client Server Client machine Server machine Ilustrasi C-S Computing

3 3 Memahami Port  Protokol TCP dan UDP menggunakan port untuk mengumpulkan data dari komputer jaringan. server P o r t Client TCP TCP or UDP port app port#data Data Packet

4 4 Memahami Port  Port sebuah terminal virtual yang digambarkan dengan sebuah Nilai (integer) sebagai tempat keluar masuk data  Beberapa port telah direkomendasikan sebagai sebuah services antara lain :  ftp 21/tcp  telnet 23/tcp  smtp 25/tcp  login 513/tcp  User level process/services generally use port number value >= 1024

5 5 Sockets  Sockets provide an interface for programming networks at the transport layer.  Network communication using Sockets is very much similar to performing file I/O  In fact, socket handle is treated like file handle.  The streams used in file I/O operation are also applicable to socket-based I/O  Socket-based communication is programming language independent.  That means, a socket program written in Java language can also communicate to a program written in Java or non-Java socket program.

6 6 Socket Communication  A server (program) runs on a specific computer and has a socket that is bound to a specific port. The server waits and listens to the socket for a client to make a connection request. server Client Connection request port

7 7 Socket Communication  If everything goes well, the server accepts the connection. Upon acceptance, the server gets a new socket bounds to a different port. It needs a new socket (consequently a different port number) so that it can continue to listen to the original socket for connection requests while serving the connected client. server Client Connection port

8 8 Implementasi PHP Sockets ServerSocket(8000) Socket(“ ”, 8000) Output/write stream Input/read stream It can be host_name like “informatika.itp.ac.id” Client Server

9 Contoh Implementasi PHP dalam Pemograman Sockets  Buatlah file : - stream_server.php - stream_client.php - formsockclient.php  Buka browser, lalu aktifkan stream_server.php, buka browser lain aktifkan formsockclient.php

10 Tugas Kelompok  Buatlah program Chatting LAN / program Chatting berbasis pemograman jaringan  Buatkan laporan hardcopy atas tugas ini.  Masing-masing kelompok akan dilakukan pengujian atas tugas nya.


Download ppt "PEMOGRAMAN BERBASIS JARINGAN. 2 Network Request Result a client, a server, and network Client Server Client machine Server machine Ilustrasi C-S Computing."

Presentasi serupa


Iklan oleh Google