pemograman berbasis jaringan n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
PEMOGRAMAN SOCKET PowerPoint Presentation
Download Presentation
PEMOGRAMAN SOCKET

Loading in 2 Seconds...

play fullscreen
1 / 10

PEMOGRAMAN SOCKET - PowerPoint PPT Presentation


  • 145 Views
  • Uploaded on

PEMOGRAMAN BERBASIS JARINGAN. PEMOGRAMAN SOCKET. Ilustrasi C-S Computing. a client, a server, and network. Request. Client. Server. Network. Result. Client machine. Server machine. Protokol TCP dan UDP menggunakan port untuk mengumpulkan data dari komputer jaringan. Memahami Port.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'PEMOGRAMAN SOCKET' - zephr-waters


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
ilustrasi c s computing
Ilustrasi C-S Computing

a client, a server, and network

Request

Client

Server

Network

Result

Client machine

Server machine

memahami port
Protokol TCP dan UDP menggunakan port untuk mengumpulkan data dari komputer jaringan.Memahami Port

server

Port

TCP

Client

app

app

app

app

port

port

port

port

TCP or UDP

Packet

Data

port#

data

memahami port1
Memahami Port
  • Port sebuah terminal virtual yang digambarkandengansebuahNilai (integer) sebagaitempatkeluarmasuk data
  • Beberapa port telahdirekomendasikansebagaisebuah 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
sockets
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.
socket communication
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

Connection request

port

Client

socket communication1
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

port

port

Client

port

Connection

implementasi php sockets

Server

Client

Implementasi PHP Sockets

ServerSocket(8000)

Output/write stream

Input/read stream

Socket(“127.0.0.1”, 8000)

It can be host_name like “informatika.itp.ac.id”

contoh implementasi php dalam pemograman sockets
ContohImplementasi PHP dalamPemograman Sockets
  • Buatlah file :

- stream_server.php

- stream_client.php

- formsockclient.php

  • Buka browser, lalu aktifkan stream_server.php, buka browser lain aktifkan formsockclient.php
tugas kelompok
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.