SlideShare a Scribd company logo
1 of 52
Pemrograman Jaringan
Ahmad Ashari – 2008
Java Program

Java source di buat
− pakai text editor dan disimpan dengan nama sesuai
nama class (Case Sensitive) dan ekstensi .java

Di compile menghasilkan Byte code dengan
nama sesuai nama class (Case Sensitive) dan
ekstensi .class
− Memerlukan java compiler yang tersedia di JDK

Byte code di jalankan menggunakan JVM
− JVM diperoleh dalam paket JRE atau JDK
Client – Server

Bentuk komunikasi menggunakan model client
server

Program yang dibuat harus terdiri dari client
dan server

Server bersifat pasif, program yang menunggu

Client bersifat aktif, program yang
menghubungi server

P2P juga mempunyai client dan server
Komunikasi Antar Aplikasi

IPC = Komunikasi antar proses
− Shared memory
− Message Passing di jaringan

Socket

RPC/RMI

Socket dibuat berdasarkan pasangan alamat IP
dan port yang dipakai/dipilih

Alamat IP sering digantikan oleh nama host

port adalah bilangan 1 – 65535 untuk tcp/udp
Socket

Socket adalah representasi dari gerbang
komunikasi di jaringan

Socket bekerja layaknya layanan I/O Unix
seperti akses file, pipe dan FIFO.
− fd = fopen --> fd adalah file descriptor

Socket berfungsi untuk:
− Meng establish koneksi, dan
− Menentukan alamat untuk gerbang komunikasi
Port

Socket dibuat menggunakan pasangan port
dan ip address

Port untuk transport layer (untuk 1 aplikasi
diperjanjikan 1 port tententu)
− 16 bit --> nilainya 1 – 65535

Ip address network layer
Sockets dan Ports
message
agreed port
any port
socketsocket
Internet address = 138.37.88.249Internet address = 138.37.94.248
other ports
client server
Client
creates socket
sends to addr/port
Server
creates socket
binds to port
advertises addr/port
Multiplex-demultiplex di jaringan
Aplikasi 2Aplikasi 1 Aplikasi 4Aplikasi 3
TCP/UDP Lainnya
IP
...
Ethernet
Lainnya...
Netbios
RPC
Java net API

Socket di Java dibedakan dalam 3 macam:
− Socket client untuk TCP (stream)

java.net.Socket
− Socket server untuk TCP (stream)

java.net.ServerSocket
− Socket datagram untuk UDP

java.net.DatagramSocket
Client socket

public Socket(String host, int port) throws
UnknownHostException, IOException

Contoh:
try {
Socket toOReilly = new Socket("www.oreilly.com", 80);
// send and receive data...
}
catch (UnknownHostException ex) {
System.err.println(ex);
}
catch (IOException ex) {
System.err.println(ex);
Class SocketAddress dan connect
package java.net.*;
public abstract class SocketAddress {
public SocketAddress( ) {}
}
public SocketAddress getRemoteSocketAddress( )
public SocketAddress getLocalSocketAddress( )
A SocketAddress is necessary to connect an unconnected
socket via the connect( ) method:
public void connect(SocketAddress endpoint) throws IOException
Server socket

public ServerSocket(int port) throws
BindException, IOException

public ServerSocket(int port, int queueLength)
throws BindException, IOException

public ServerSocket(int port, int queueLength,
InetAddress bindAddress)
throws IOException

public ServerSocket( ) throws IOException //
Java 1.4
Step utk Program Client TCP

Create a Socket object.
− Socket client = new Socket("hostname", portNumber);

Create an output stream that can be used to send information to the Socket.
− PrintWriter out = new PrintWriter(client.getOutputStream(), true);

Create an input stream to read the response from the server.
− InputStreamReader in = new
InputStreamReader(client.getInputStream());

Do I/O with input and output streams.

Close the Socket when done.
− client.close();
Program Client untuk TCP
import java.net.*;
import java.io.*;
public class DaytimeClient {
public static void main(String[] args) {
String hostname;
if (args.length > 0) {
hostname = args[0];
}
else {
hostname = "tock.usno.navy.mil";
}
try {
Socket theSocket = new Socket(hostname, 13);
InputStream timeStream = theSocket.getInputStream();
StringBuffer time = new StringBuffer();
Program Client untuk TCP
int c;
while ((c = timeStream.read()) != -1) time.append((char) c);
String timeString = time.toString().trim();
System.out.println("It is " + timeString + " at " + hostname);
} // end try
catch (UnknownHostException e) {
System.err.println(e);
}
catch (IOException e) {
System.err.println(e);
}
} // end main
} // end DaytimeClient
Step utk Program Server TCP

Create a ServerSocket object.
− ServerSocket listenSocket =
new ServerSocket(portNumber);

Create a Socket object from the ServerSocket
(accept connection)
− Socket server = listenSocket.accept();

Create an input stream to read input from the client
− BufferedReader in = new BufferedReader
(new InputStreamReader(server.getInputStream()));

Create an output stream that can be used to
send information back to the client
− PrintWriter out = new PrintWriter(server.getOutputStream());

Do I/O with input and output streams.

Close the Socket when done.
− server.close();
Program Server untuk TCP
import java.net.*;
import java.io.*;
import java.util.Date;
public class DaytimeServer {
public final static int DEFAULT_PORT = 13;
public static void main(String[] args) {
int port = DEFAULT_PORT;
if (args.length > 0) {
try {
port = Integer.parseInt(args[0]);
if (port < 1 || port > 65535) {
System.out.println("Port must between 1 and 65535");
return;
}
}
Program Server untuk TCP
catch (NumberFormatException ex) {
// use default port }
}
try {
ServerSocket server = new ServerSocket(port);
Socket connection = null;
while (true) {
try {
connection = server.accept();
Writer out = new
OutputStreamWriter(connection.getOutputStream());
Date now = new Date();
out.write(now.toString() +"rn");
out.flush();
connection.close();
}
Program Server untuk TCP
catch (IOException ex) {}
finally {
try {
if (connection != null) connection.close();
}
catch (IOException ex) {}
}
} // end while
} // end try
catch (IOException ex) {
System.err.println(ex);
} // end catch
} // end main
} // end DaytimeServer
Client UDP
import java.net.*;
import java.io.*;
public class UDPDiscardClient {
public final static int DEFAULT_PORT = 9;
public static void main(String[] args) {
String hostname;
int port = DEFAULT_PORT;
if (args.length > 0) {
hostname = args[0];
try {
port = Integer.parseInt(args[1]);
}
catch (Exception ex) {
// use default port
}
}
else {
hostname = "localhost";
}
Client UDP
try {
InetAddress server = InetAddress.getByName(hostname);
BufferedReader userInput = new BufferedReader(new
InputStreamReader(System.in));
DatagramSocket theSocket = new DatagramSocket();
while (true) {
String theLine = userInput.readLine();
if (theLine.equals(".")) break;
byte[] data = theLine.getBytes();
DatagramPacket theOutput = new DatagramPacket(data,
data.length, server, port);
theSocket.send(theOutput);
} // end while
} catch (UnknownHostException uhex) {
System.err.println(uhex);
} catch (SocketException sex) {
System.err.println(sex);
} catch (IOException ioex) {
System.err.println(ioex); }
} // end main
}
Server UDP
import java.net.*;
import java.io.*;
public class UDPDiscardServer {
public final static int DEFAULT_PORT = 9;
public final static int MAX_PACKET_SIZE =
65507;
public static void main(String[] args) {
int port = DEFAULT_PORT;
byte[] buffer = new byte[MAX_PACKET_SIZE];
try {
port = Integer.parseInt(args[0]);
}
catch (Exception ex) {
// use default port
}
Server UDP
try {
DatagramSocket server = new DatagramSocket(port);
DatagramPacket packet = new DatagramPacket(buffer,
buffer.length);
while (true) {
try {
server.receive(packet);
String s = new String(packet.getData(), 0,
packet.getLength());
System.out.println(packet.getAddress() + " at
port " + packet.getPort() + " says " + s);
// reset the length for the next packet
packet.setLength(buffer.length);
} catch (IOException ex) {
System.err.println(ex);
}
} // end while
} catch (SocketException ex) {
System.err.println(ex); } // end catch
} // end main
}
15 July 2002 © John H. Hine 2002 24
UDP Socket Structure
Client
process
Server
process
server
socket
client
socketresponse
request
host name
port number
15 July 2002 © John H. Hine 2002 25
UDP Steps
Server (on hostId)
Create socket with port = x
Publish “hostId, port=x”
Read request from socket
Write reply to socket
Close socket
Client
Create socket
Create address (hostId, port=x)
Send request on client socket
Read reply from client socket
Close client socket
15 July 2002 © John H. Hine 2002 26
C Client - create a socket
#define DATA "The sea is calm tonight, the tide is full . . .”
main(argc, argv)
int argc;
char *argv[ ];
{
int sock;
struct sockaddr_in name;
struct hostent *hp, *gethostbyname();
/* Create socket on which to send. */
sock = socket(AF_INET, SOCK_DGRAM, 0);
if (sock < 0) { perror("opening datagram socket"); exit(1); }
struct sockaddr_in {
short sin_family;
u_short sin_port;
struct in_addr sin_addr;
char sin_zero[8];
};
Internet socket
UDP (datagram)
15 July 2002 © John H. Hine 2002 27
C Client - Send The Message
hp = gethostbyname(argv[1]);
if (hp == 0) {
fprintf(stderr, "%s: unknown hostn", argv[1]); exit(2);
}
bcopy(hp->h_addr, &name.sin_addr, hp->h_length);
name.sin_family = AF_INET;
name.sin_port = htons(atoi(argv[2]));
/* Send message. */
if (sendto(sock, DATA, sizeof(DATA), 0, &name,
sizeof(name)) < 0)
perror("sending datagram message");
close(sock);
}
server domain name
port number
15 July 2002 © John H. Hine 2002 28
C UDP Server - create socket
main()
{
int sock, length;
struct sockaddr_in name;
char buf[1024];
/* Create socket from which to read. */
sock = socket(AF_INET, SOCK_DGRAM, 0);
if (sock < 0) {
perror("opening datagram socket");
exit(1);
}
Internet socket
UDP (datagram)
15 July 2002 © John H. Hine 2002 29
C UDP Server - bind to port
/* Create name with wildcards. */
name.sin_family = AF_INET;
name.sin_addr.s_addr = INADDR_ANY;
name.sin_port = 0;
if (bind(sock, &name, sizeof(name))) {
perror("binding datagram socket");
exit(1);
}
accept
connections
from
assign
default
port number
15 July 2002 © John H. Hine 2002 30
C UDP Server - Read the data
/* Find assigned port value and print it out. */
length = sizeof(name);
if (getsockname(sock, &name, &length)) {
perror("getting socket name");
exit(1);
}
printf("Socket has port #%den", ntohs(name.sin_port));
/* Read from the socket */
if (read(sock, buf, 1024) < 0)
perror("receiving datagram packet");
printf("-->%sen", buf);
close(sock);
}
17 July 2002 © John H. Hine 2002 31
RPC
interface definition
IDL compiler
client
stub
header
server
stub
client
source
server
source
C compilerC compiler
server stub
object
server
object
C compiler C compiler
client
object
client stub
object
ravg.c avg_proc.c
avg.x
avg_clnt.c
avg.h
avg_svc.c
avg_xdr.c
ravg avg_svc
17 July 2002 © John H. Hine 2002 32
Passing Value Parameters

Steps involved in doing remote computation through RPC
2-8
RPC

avg.x --> interface specification
− Setelah di compile pakai rpcgen, menghasilkan
− avg.h, avg_xdr.c, avg_clnt.c, avg_svc.c

avg_proc.c --> procedure di server

ravg.c --> main program di client

Di compile dengan cara:
− Client: cc -o ravg ravg.c avg_xdr.c avg_clnt.c
− ravg
− Server: cc -o avg_svc avg_proc.c avg_xdr.c avg_svc.c
− avg_svc
avg.x
const MAXAVGSIZE = 200;
struct input_data {
double input_data<200>;
};
typedef struct input_data input_data;
program AVERAGEPROG {
version AVERAGEVERS {
double AVERAGE(input_data) = 1;
} = 1;
} = 22855;
Client: ravg.c
#include "avg.h"
#include <stdlib.h>
void averageprog_1( char* host, int argc, char *argv[]) {
CLIENT *clnt;
double *result_1, *dp, f;
char *endptr;
int i;
input_data average_1_arg;
average_1_arg.input_data.input_data_val =
(double*) malloc(MAXAVGSIZE*sizeof(double));
dp = average_1_arg.input_data.input_data_val;
average_1_arg.input_data.input_data_len =
argc - 2;
Client: ravg.c
for (i=1;i<=(argc - 2);i++) {
f = strtod(argv[i+1],&endptr);
printf("value = %en",f);
*dp = f;
dp++;
}
clnt = clnt_create(host, AVERAGEPROG,
argv[0]);
exit(1);
}
if(argc > MAXAVGSIZE + 2) {
printf("Two many input valuesn");
exit(2);
Server: avg_proc.c
#include <rpc/rpc.h>
#include "avg.h"
#include <stdio.h>
static double sum_avg;
double * average_1(input_data *input, CLIENT *client) {
double *dp = input->input_data.input_data_val;
u_int i;
sum_avg = 0;
for(i=1;i<=input->input_data.input_data_len;i++) {
sum_avg = sum_avg + *dp; dp++;
}
Server: avg_proc.c
sum_avg = sum_avg / input->input_data.input_data_len;
return(&sum_avg);
}
double * average_1_svc(input_data *input, struct svc_req *svc)
{
CLIENT *client;
return(average_1(input,client));
}
Running RPC
Menjalankan server:
avg_svc &
menjalankan client:
ravg server 2 3 4 5
hasilnya
value = 2.000000e+00
value = 3.000000e+00
value = 4.000000e+00
value = 5.000000e+00
average = 3.500000e+00
bila berhasil
Aplikasi yang menerapkan RPC

NFS (Network File System)

NIS (Network Information System)
− YP (Yellow Pages)
Bentuk Komunikasi

Unicast --> TCP
− Satu tujuan

Broadcast --> UDP
− Semua tujuan
− Semua host pada jaringan A, B, dan C akan
menerima

Multicast --> bentuk khusus dari UDP
− Banyak tujuan yang dipilih
− Misal pada jaringan A dipilih 5 dari 20, jaringan B
dipilih 3 dari 10, dan jaringan C dipilih 2 dari 6
− Jumlah hosts dari jaringan A, B, dan C ada 36,
namun yang dipilih hanya 10
Multicast socket

Class MulticastSocket merupakan subclass dari
DatagramSocket
public class MulticastSocket extends DatagramSocket

Pemanggilan class tanpa parameter
public MulticastSocket( ) throws SocketException

Pemanggilan class dengan parameter port
public MulticastSocket(int port) throws SocketException

Pemanggilan class dengan parameter SocketAddress
public MulticastSocket(SocketAddress bindAddress) throws
IOException
Contoh pemanggilan
try {
MulticastSocket ms = new MulticastSocket( );
// send some datagrams...
}
catch (SocketException se) {
System.err.println(se);
}
try {
MulticastSocket ms = new MulticastSocket(4000);
// receive incoming datagrams...
}
catch (SocketException ex) {
System.err.println(ex);
}
Contoh pemanggilan
try {
SocketAddress address = new
InetSocketAddress(4000);
MulticastSocket ms = new MulticastSocket(address);
// receive incoming datagrams...
}
catch (SocketException ex) {
System.err.println(ex);
}
Java RMI

Interface --> Fibonacci.java

Class untuk implementasi dari interface
− FibonacciImpl.java

Class untuk register server nya
− FibonacciServer.java

Class untuk client
− FibonacciClient.java
Meng compile RMI

Seluruh class di compile dengan cara
javac Fibonacci*.java

Hasil compile dari class Implementasi server
(file .class nya) di compile lagi untuk
menghasilkan skeleton dan stub dengan cara
rmic FibonacciImpl
Menjalankan Java RMI

Menjalankan rmiregistry dengan cara
start rmiregistry --> di Windows
atau
rmiregistry & --> di Linux

Menjalankan server dengan cara
java FibonacciServer

Menjalankan client dengan cara
java FibonacciClient rmi://host.com/fibonacci 0 1 2 3 4 5

Hasil outputnya:
The 0th Fibonacci number is 1
The 1th Fibonacci number is 1
The 2th Fibonacci number is 2
The 3th Fibonacci number is 3
The 4th Fibonacci number is 5
The 5th Fibonacci number is 8

Pemrograman berbasis Socket, aplikasi yang dibuat

langsung menggunakan transport (TCP/UDP) -->

layer 4 = identik dengan low level programming

Pemrograman berbasis RPC/RMI, aplikasi yang

dibuat tidak mengakses langsung ke transport

melainkan melalui perantaraan RPC/RMI (layer 5 dan

6) = midle level programming

Pemrograman berbasis Web, aplikasi di buat di atas

aplikasi Web (layer 7) = high level programming
Arsitektur Web
Web Browser Web Server
URL via HTTP
HTML via HTTP
Client Server
Web Programming

Program di jalan kan di Web Browser (di Client)
− Dibuat menggunakan bahasa pemrograman
− Java (Applet) atau bahasa scripting Javascript

Program di jalan kan di Web Server (di Server)
Client side program

Program diambil dari server bersama-sama
dengan html nya dan di jalan kan di client

Menggunakan Javascript atau Java Applet
Server Side Program

Memakai: CGI dengan bahasa apa saja (c++
dan perl/python, ASP, Java Servlet, dan PHP

More Related Content

What's hot

Infinum Android Talks #16 - Retrofit 2 by Kristijan Jurkovic
Infinum Android Talks #16 - Retrofit 2 by Kristijan JurkovicInfinum Android Talks #16 - Retrofit 2 by Kristijan Jurkovic
Infinum Android Talks #16 - Retrofit 2 by Kristijan JurkovicInfinum
 
Retrofit 2 - O que devemos saber
Retrofit 2 - O que devemos saberRetrofit 2 - O que devemos saber
Retrofit 2 - O que devemos saberBruno Vieira
 
Provisioning with OSGi Subsystems and Repository using Apache Aries and Felix
Provisioning with OSGi Subsystems and Repository using Apache Aries and FelixProvisioning with OSGi Subsystems and Repository using Apache Aries and Felix
Provisioning with OSGi Subsystems and Repository using Apache Aries and FelixDavid Bosschaert
 
Netty: asynchronous data transfer
Netty: asynchronous data transferNetty: asynchronous data transfer
Netty: asynchronous data transferVictor Cherkassky
 
Connecting to the network
Connecting to the networkConnecting to the network
Connecting to the networkMu Chun Wang
 
Twisted logic
Twisted logicTwisted logic
Twisted logicashfall
 
8 Minutes On Rack
8 Minutes On Rack8 Minutes On Rack
8 Minutes On Rackdanwrong
 
#5 (Remote Method Invocation)
#5 (Remote Method Invocation)#5 (Remote Method Invocation)
#5 (Remote Method Invocation)Ghadeer AlHasan
 
Client server part 12
Client server part 12Client server part 12
Client server part 12fadlihulopi
 
HTTP Whiteboard - OSGI Compendium 6.0 - How web apps should have been! - R Auge
HTTP Whiteboard - OSGI Compendium 6.0 - How web apps should have been! - R AugeHTTP Whiteboard - OSGI Compendium 6.0 - How web apps should have been! - R Auge
HTTP Whiteboard - OSGI Compendium 6.0 - How web apps should have been! - R Augemfrancis
 
Python concurrency: libraries overview
Python concurrency: libraries overviewPython concurrency: libraries overview
Python concurrency: libraries overviewAndrii Mishkovskyi
 
Netty from the trenches
Netty from the trenchesNetty from the trenches
Netty from the trenchesJordi Gerona
 
Network programming using python
Network programming using pythonNetwork programming using python
Network programming using pythonAli Nezhad
 
Socket programming-tutorial-sk
Socket programming-tutorial-skSocket programming-tutorial-sk
Socket programming-tutorial-sksureshkarthick37
 
Java- Datagram Socket class & Datagram Packet class
Java- Datagram Socket class  & Datagram Packet classJava- Datagram Socket class  & Datagram Packet class
Java- Datagram Socket class & Datagram Packet classRuchi Maurya
 

What's hot (20)

Infinum Android Talks #16 - Retrofit 2 by Kristijan Jurkovic
Infinum Android Talks #16 - Retrofit 2 by Kristijan JurkovicInfinum Android Talks #16 - Retrofit 2 by Kristijan Jurkovic
Infinum Android Talks #16 - Retrofit 2 by Kristijan Jurkovic
 
Retrofit 2 - O que devemos saber
Retrofit 2 - O que devemos saberRetrofit 2 - O que devemos saber
Retrofit 2 - O que devemos saber
 
Provisioning with OSGi Subsystems and Repository using Apache Aries and Felix
Provisioning with OSGi Subsystems and Repository using Apache Aries and FelixProvisioning with OSGi Subsystems and Repository using Apache Aries and Felix
Provisioning with OSGi Subsystems and Repository using Apache Aries and Felix
 
Tcp sockets
Tcp socketsTcp sockets
Tcp sockets
 
A.java
A.javaA.java
A.java
 
Socket.io v.0.8.3
Socket.io v.0.8.3Socket.io v.0.8.3
Socket.io v.0.8.3
 
Netty: asynchronous data transfer
Netty: asynchronous data transferNetty: asynchronous data transfer
Netty: asynchronous data transfer
 
Connecting to the network
Connecting to the networkConnecting to the network
Connecting to the network
 
Twisted logic
Twisted logicTwisted logic
Twisted logic
 
Network
NetworkNetwork
Network
 
8 Minutes On Rack
8 Minutes On Rack8 Minutes On Rack
8 Minutes On Rack
 
#5 (Remote Method Invocation)
#5 (Remote Method Invocation)#5 (Remote Method Invocation)
#5 (Remote Method Invocation)
 
Client server part 12
Client server part 12Client server part 12
Client server part 12
 
HTTP Whiteboard - OSGI Compendium 6.0 - How web apps should have been! - R Auge
HTTP Whiteboard - OSGI Compendium 6.0 - How web apps should have been! - R AugeHTTP Whiteboard - OSGI Compendium 6.0 - How web apps should have been! - R Auge
HTTP Whiteboard - OSGI Compendium 6.0 - How web apps should have been! - R Auge
 
Python concurrency: libraries overview
Python concurrency: libraries overviewPython concurrency: libraries overview
Python concurrency: libraries overview
 
Netty from the trenches
Netty from the trenchesNetty from the trenches
Netty from the trenches
 
Network programming using python
Network programming using pythonNetwork programming using python
Network programming using python
 
Socket programming-tutorial-sk
Socket programming-tutorial-skSocket programming-tutorial-sk
Socket programming-tutorial-sk
 
cq_cxf_integration
cq_cxf_integrationcq_cxf_integration
cq_cxf_integration
 
Java- Datagram Socket class & Datagram Packet class
Java- Datagram Socket class  & Datagram Packet classJava- Datagram Socket class  & Datagram Packet class
Java- Datagram Socket class & Datagram Packet class
 

Viewers also liked

Tugas pemrograman jaringan
Tugas pemrograman jaringanTugas pemrograman jaringan
Tugas pemrograman jaringanBanser Sahara
 
Basis data klien server
Basis data klien serverBasis data klien server
Basis data klien serverRangga Ananto
 
Laporan Chatting Server dan Client
Laporan Chatting Server dan ClientLaporan Chatting Server dan Client
Laporan Chatting Server dan Clienttrilestari08
 
Tugas 2 ihsan riadi - 1412511162
Tugas 2   ihsan riadi - 1412511162Tugas 2   ihsan riadi - 1412511162
Tugas 2 ihsan riadi - 1412511162ihsan riadi
 
Tugas 8 Rekayasa Web 0316
Tugas 8 Rekayasa Web 0316Tugas 8 Rekayasa Web 0316
Tugas 8 Rekayasa Web 0316sapatati
 
Tipe tipe dan model client server-plus
Tipe tipe dan model client server-plusTipe tipe dan model client server-plus
Tipe tipe dan model client server-plusDenny Yahya
 
Tugas 9 Rekayasa Web 0316
Tugas 9 Rekayasa Web 0316Tugas 9 Rekayasa Web 0316
Tugas 9 Rekayasa Web 0316sapatati
 
Taklimatbtpgpb
TaklimatbtpgpbTaklimatbtpgpb
Taklimatbtpgpbmazlanmn
 
Arsitektur & Organisasi komputer
Arsitektur & Organisasi komputerArsitektur & Organisasi komputer
Arsitektur & Organisasi komputerZou Anto
 
Tugas2 krisna muktiandika-1511510347
Tugas2 krisna muktiandika-1511510347Tugas2 krisna muktiandika-1511510347
Tugas2 krisna muktiandika-1511510347krisna mukti andika
 
Tugas3 krisna muktiandika-1511510347
Tugas3 krisna muktiandika-1511510347Tugas3 krisna muktiandika-1511510347
Tugas3 krisna muktiandika-1511510347krisna mukti andika
 
Praktikum pemrograman jaringan-1-3
Praktikum pemrograman jaringan-1-3Praktikum pemrograman jaringan-1-3
Praktikum pemrograman jaringan-1-3sulaiman yunus
 
Tutorial BEX (Billing Explorer) 2007
Tutorial BEX (Billing Explorer) 2007Tutorial BEX (Billing Explorer) 2007
Tutorial BEX (Billing Explorer) 2007Dimaz Muda
 
Spesifikasi Komputer Untuk Membuat komputer server-2014
Spesifikasi Komputer Untuk Membuat komputer server-2014Spesifikasi Komputer Untuk Membuat komputer server-2014
Spesifikasi Komputer Untuk Membuat komputer server-2014Ali Must Can
 
Smart Billing dan cara cara menerapkannya
Smart Billing dan cara cara menerapkannyaSmart Billing dan cara cara menerapkannya
Smart Billing dan cara cara menerapkannyaMoh Mahfud
 
Topologi Jaringan untuk Ujian Nasional Berbasis Komputer 2016
Topologi Jaringan untuk Ujian Nasional Berbasis Komputer 2016Topologi Jaringan untuk Ujian Nasional Berbasis Komputer 2016
Topologi Jaringan untuk Ujian Nasional Berbasis Komputer 2016Chusnul Labib
 

Viewers also liked (20)

Tugas pemrograman jaringan
Tugas pemrograman jaringanTugas pemrograman jaringan
Tugas pemrograman jaringan
 
Basis data klien server
Basis data klien serverBasis data klien server
Basis data klien server
 
Laporan Chatting Server dan Client
Laporan Chatting Server dan ClientLaporan Chatting Server dan Client
Laporan Chatting Server dan Client
 
Tugas 2 ihsan riadi - 1412511162
Tugas 2   ihsan riadi - 1412511162Tugas 2   ihsan riadi - 1412511162
Tugas 2 ihsan riadi - 1412511162
 
Tugas 8 Rekayasa Web 0316
Tugas 8 Rekayasa Web 0316Tugas 8 Rekayasa Web 0316
Tugas 8 Rekayasa Web 0316
 
Jaringan komputer 2
Jaringan komputer 2Jaringan komputer 2
Jaringan komputer 2
 
Peer to peer network (p2p)
Peer to peer network (p2p)Peer to peer network (p2p)
Peer to peer network (p2p)
 
Tipe tipe dan model client server-plus
Tipe tipe dan model client server-plusTipe tipe dan model client server-plus
Tipe tipe dan model client server-plus
 
Tugas 9 Rekayasa Web 0316
Tugas 9 Rekayasa Web 0316Tugas 9 Rekayasa Web 0316
Tugas 9 Rekayasa Web 0316
 
Taklimatbtpgpb
TaklimatbtpgpbTaklimatbtpgpb
Taklimatbtpgpb
 
Taklimat ke ipta 2014
Taklimat ke ipta 2014Taklimat ke ipta 2014
Taklimat ke ipta 2014
 
Arsitektur & Organisasi komputer
Arsitektur & Organisasi komputerArsitektur & Organisasi komputer
Arsitektur & Organisasi komputer
 
Tugas2 krisna muktiandika-1511510347
Tugas2 krisna muktiandika-1511510347Tugas2 krisna muktiandika-1511510347
Tugas2 krisna muktiandika-1511510347
 
Tugas3 krisna muktiandika-1511510347
Tugas3 krisna muktiandika-1511510347Tugas3 krisna muktiandika-1511510347
Tugas3 krisna muktiandika-1511510347
 
Praktikum pemrograman jaringan-1-3
Praktikum pemrograman jaringan-1-3Praktikum pemrograman jaringan-1-3
Praktikum pemrograman jaringan-1-3
 
Tutorial BEX (Billing Explorer) 2007
Tutorial BEX (Billing Explorer) 2007Tutorial BEX (Billing Explorer) 2007
Tutorial BEX (Billing Explorer) 2007
 
Cara membagi bandwidth client komputer tanpa
Cara membagi bandwidth client komputer tanpaCara membagi bandwidth client komputer tanpa
Cara membagi bandwidth client komputer tanpa
 
Spesifikasi Komputer Untuk Membuat komputer server-2014
Spesifikasi Komputer Untuk Membuat komputer server-2014Spesifikasi Komputer Untuk Membuat komputer server-2014
Spesifikasi Komputer Untuk Membuat komputer server-2014
 
Smart Billing dan cara cara menerapkannya
Smart Billing dan cara cara menerapkannyaSmart Billing dan cara cara menerapkannya
Smart Billing dan cara cara menerapkannya
 
Topologi Jaringan untuk Ujian Nasional Berbasis Komputer 2016
Topologi Jaringan untuk Ujian Nasional Berbasis Komputer 2016Topologi Jaringan untuk Ujian Nasional Berbasis Komputer 2016
Topologi Jaringan untuk Ujian Nasional Berbasis Komputer 2016
 

Similar to Pemrograman Jaringan

Java Socket Programming
Java Socket ProgrammingJava Socket Programming
Java Socket ProgrammingVipin Yadav
 
Socket Programming it-slideshares.blogspot.com
Socket  Programming it-slideshares.blogspot.comSocket  Programming it-slideshares.blogspot.com
Socket Programming it-slideshares.blogspot.comphanleson
 
Networking.ppt(client/server, socket) uses in program
Networking.ppt(client/server, socket) uses in programNetworking.ppt(client/server, socket) uses in program
Networking.ppt(client/server, socket) uses in programgovindjha339843
 
Advance Java-Network Programming
Advance Java-Network ProgrammingAdvance Java-Network Programming
Advance Java-Network Programmingashok hirpara
 
network programing lab file ,
network programing lab file ,network programing lab file ,
network programing lab file ,AAlha PaiKra
 
Chatting dengan beberapa pc laptop
Chatting dengan beberapa pc laptopChatting dengan beberapa pc laptop
Chatting dengan beberapa pc laptopyayaria
 
TCP IP
TCP IPTCP IP
TCP IPhivasu
 
Networking & Socket Programming In Java
Networking & Socket Programming In JavaNetworking & Socket Programming In Java
Networking & Socket Programming In JavaAnkur Agrawal
 
Laporan multiclient chatting client server
Laporan multiclient chatting client serverLaporan multiclient chatting client server
Laporan multiclient chatting client servertrilestari08
 
Socket Programming - nitish nagar
Socket Programming - nitish nagarSocket Programming - nitish nagar
Socket Programming - nitish nagarNitish Nagar
 
Networks lab
Networks labNetworks lab
Networks labsvijiiii
 
Networks lab
Networks labNetworks lab
Networks labsvijiiii
 
session6-Network Programming.pptx
session6-Network Programming.pptxsession6-Network Programming.pptx
session6-Network Programming.pptxSrinivasanG52
 

Similar to Pemrograman Jaringan (20)

Java Socket Programming
Java Socket ProgrammingJava Socket Programming
Java Socket Programming
 
Socket Programming it-slideshares.blogspot.com
Socket  Programming it-slideshares.blogspot.comSocket  Programming it-slideshares.blogspot.com
Socket Programming it-slideshares.blogspot.com
 
Networking.ppt(client/server, socket) uses in program
Networking.ppt(client/server, socket) uses in programNetworking.ppt(client/server, socket) uses in program
Networking.ppt(client/server, socket) uses in program
 
Advance Java-Network Programming
Advance Java-Network ProgrammingAdvance Java-Network Programming
Advance Java-Network Programming
 
network programing lab file ,
network programing lab file ,network programing lab file ,
network programing lab file ,
 
Chatting dengan beberapa pc laptop
Chatting dengan beberapa pc laptopChatting dengan beberapa pc laptop
Chatting dengan beberapa pc laptop
 
Ipc
IpcIpc
Ipc
 
Unit 8 Java
Unit 8 JavaUnit 8 Java
Unit 8 Java
 
TCP IP
TCP IPTCP IP
TCP IP
 
Networking & Socket Programming In Java
Networking & Socket Programming In JavaNetworking & Socket Programming In Java
Networking & Socket Programming In Java
 
Java 1
Java 1Java 1
Java 1
 
Java Networking
Java NetworkingJava Networking
Java Networking
 
Laporan multiclient chatting client server
Laporan multiclient chatting client serverLaporan multiclient chatting client server
Laporan multiclient chatting client server
 
Socket Programming - nitish nagar
Socket Programming - nitish nagarSocket Programming - nitish nagar
Socket Programming - nitish nagar
 
Os 2
Os 2Os 2
Os 2
 
Networks lab
Networks labNetworks lab
Networks lab
 
Networks lab
Networks labNetworks lab
Networks lab
 
java sockets
 java sockets java sockets
java sockets
 
#2 (UDP)
#2 (UDP)#2 (UDP)
#2 (UDP)
 
session6-Network Programming.pptx
session6-Network Programming.pptxsession6-Network Programming.pptx
session6-Network Programming.pptx
 

More from belajarkomputer

Yogie Saputra - Deadlock
Yogie Saputra - DeadlockYogie Saputra - Deadlock
Yogie Saputra - Deadlockbelajarkomputer
 
Sri Astuti - Penjadwalan CPU
Sri Astuti - Penjadwalan CPUSri Astuti - Penjadwalan CPU
Sri Astuti - Penjadwalan CPUbelajarkomputer
 
Bagas Perdana Putra - Pengenalan Sistem Operasi
Bagas Perdana Putra - Pengenalan Sistem OperasiBagas Perdana Putra - Pengenalan Sistem Operasi
Bagas Perdana Putra - Pengenalan Sistem Operasibelajarkomputer
 
Suci Arrum Meilani - Manajemen Memori
Suci Arrum Meilani - Manajemen MemoriSuci Arrum Meilani - Manajemen Memori
Suci Arrum Meilani - Manajemen Memoribelajarkomputer
 
Agung Deswantoro Adi - Memori Virtual
Agung Deswantoro Adi - Memori VirtualAgung Deswantoro Adi - Memori Virtual
Agung Deswantoro Adi - Memori Virtualbelajarkomputer
 
Juliyah - Intelligensi Transfer Sinyal
Juliyah - Intelligensi Transfer SinyalJuliyah - Intelligensi Transfer Sinyal
Juliyah - Intelligensi Transfer Sinyalbelajarkomputer
 
Helen Alida Abilio - Sistem Keamanan
Helen Alida Abilio - Sistem KeamananHelen Alida Abilio - Sistem Keamanan
Helen Alida Abilio - Sistem Keamananbelajarkomputer
 
Helen Alida Abilio - Deadlock
Helen Alida Abilio - DeadlockHelen Alida Abilio - Deadlock
Helen Alida Abilio - Deadlockbelajarkomputer
 
Helen Alida Abilio - Sinkronisasi
Helen Alida Abilio - SinkronisasiHelen Alida Abilio - Sinkronisasi
Helen Alida Abilio - Sinkronisasibelajarkomputer
 
Helen Alida Abilio - Manajemen File
Helen Alida Abilio - Manajemen FileHelen Alida Abilio - Manajemen File
Helen Alida Abilio - Manajemen Filebelajarkomputer
 
Helen Alida Abilio - Manajemen proses
Helen Alida Abilio - Manajemen prosesHelen Alida Abilio - Manajemen proses
Helen Alida Abilio - Manajemen prosesbelajarkomputer
 
Helen Alida Abilio - Manajemen Memori
Helen Alida Abilio - Manajemen MemoriHelen Alida Abilio - Manajemen Memori
Helen Alida Abilio - Manajemen Memoribelajarkomputer
 
Helen Alida Abilio - Manajemen input dan output
Helen Alida Abilio - Manajemen input dan outputHelen Alida Abilio - Manajemen input dan output
Helen Alida Abilio - Manajemen input dan outputbelajarkomputer
 
Helen Alida Abilio - Manajemen memori
Helen Alida Abilio - Manajemen memoriHelen Alida Abilio - Manajemen memori
Helen Alida Abilio - Manajemen memoribelajarkomputer
 
Helen Alida Abilio - Konkurensi
Helen Alida Abilio - KonkurensiHelen Alida Abilio - Konkurensi
Helen Alida Abilio - Konkurensibelajarkomputer
 
Helen Alida Abilio - Manajemen Proses
Helen Alida Abilio - Manajemen ProsesHelen Alida Abilio - Manajemen Proses
Helen Alida Abilio - Manajemen Prosesbelajarkomputer
 
Helen Alida Abilio - Struktur Sistem Operasi
Helen Alida Abilio - Struktur Sistem OperasiHelen Alida Abilio - Struktur Sistem Operasi
Helen Alida Abilio - Struktur Sistem Operasibelajarkomputer
 
Helen Alida Abilio - Konsep Sistem operasi
Helen Alida Abilio - Konsep Sistem operasiHelen Alida Abilio - Konsep Sistem operasi
Helen Alida Abilio - Konsep Sistem operasibelajarkomputer
 
Helen Alida Abilio - Konsep Sistem Komputer
Helen Alida Abilio - Konsep Sistem KomputerHelen Alida Abilio - Konsep Sistem Komputer
Helen Alida Abilio - Konsep Sistem Komputerbelajarkomputer
 

More from belajarkomputer (20)

Yogie Saputra - Deadlock
Yogie Saputra - DeadlockYogie Saputra - Deadlock
Yogie Saputra - Deadlock
 
Sri Astuti - Penjadwalan CPU
Sri Astuti - Penjadwalan CPUSri Astuti - Penjadwalan CPU
Sri Astuti - Penjadwalan CPU
 
Bagas Perdana Putra - Pengenalan Sistem Operasi
Bagas Perdana Putra - Pengenalan Sistem OperasiBagas Perdana Putra - Pengenalan Sistem Operasi
Bagas Perdana Putra - Pengenalan Sistem Operasi
 
Suci Arrum Meilani - Manajemen Memori
Suci Arrum Meilani - Manajemen MemoriSuci Arrum Meilani - Manajemen Memori
Suci Arrum Meilani - Manajemen Memori
 
Agung Deswantoro Adi - Memori Virtual
Agung Deswantoro Adi - Memori VirtualAgung Deswantoro Adi - Memori Virtual
Agung Deswantoro Adi - Memori Virtual
 
Juliyah - Intelligensi Transfer Sinyal
Juliyah - Intelligensi Transfer SinyalJuliyah - Intelligensi Transfer Sinyal
Juliyah - Intelligensi Transfer Sinyal
 
Helen Alida Abilio - Sistem Keamanan
Helen Alida Abilio - Sistem KeamananHelen Alida Abilio - Sistem Keamanan
Helen Alida Abilio - Sistem Keamanan
 
Helen Alida Abilio - Deadlock
Helen Alida Abilio - DeadlockHelen Alida Abilio - Deadlock
Helen Alida Abilio - Deadlock
 
Helen Alida Abilio - Sinkronisasi
Helen Alida Abilio - SinkronisasiHelen Alida Abilio - Sinkronisasi
Helen Alida Abilio - Sinkronisasi
 
Helen Alida Abilio - Manajemen File
Helen Alida Abilio - Manajemen FileHelen Alida Abilio - Manajemen File
Helen Alida Abilio - Manajemen File
 
Helen Alida Abilio - Manajemen proses
Helen Alida Abilio - Manajemen prosesHelen Alida Abilio - Manajemen proses
Helen Alida Abilio - Manajemen proses
 
Helen Alida Abilio - Manajemen Memori
Helen Alida Abilio - Manajemen MemoriHelen Alida Abilio - Manajemen Memori
Helen Alida Abilio - Manajemen Memori
 
Helen Alida Abilio - Manajemen input dan output
Helen Alida Abilio - Manajemen input dan outputHelen Alida Abilio - Manajemen input dan output
Helen Alida Abilio - Manajemen input dan output
 
Helen Alida Abilio - Manajemen memori
Helen Alida Abilio - Manajemen memoriHelen Alida Abilio - Manajemen memori
Helen Alida Abilio - Manajemen memori
 
Helen Alida Abilio - Konkurensi
Helen Alida Abilio - KonkurensiHelen Alida Abilio - Konkurensi
Helen Alida Abilio - Konkurensi
 
Helen Alida Abilio - Manajemen Proses
Helen Alida Abilio - Manajemen ProsesHelen Alida Abilio - Manajemen Proses
Helen Alida Abilio - Manajemen Proses
 
Helen Alida Abilio - Struktur Sistem Operasi
Helen Alida Abilio - Struktur Sistem OperasiHelen Alida Abilio - Struktur Sistem Operasi
Helen Alida Abilio - Struktur Sistem Operasi
 
Helen Alida Abilio - Konsep Sistem operasi
Helen Alida Abilio - Konsep Sistem operasiHelen Alida Abilio - Konsep Sistem operasi
Helen Alida Abilio - Konsep Sistem operasi
 
Konsep sistem operasi
Konsep sistem operasiKonsep sistem operasi
Konsep sistem operasi
 
Helen Alida Abilio - Konsep Sistem Komputer
Helen Alida Abilio - Konsep Sistem KomputerHelen Alida Abilio - Konsep Sistem Komputer
Helen Alida Abilio - Konsep Sistem Komputer
 

Recently uploaded

Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...SofiyaSharma5
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)Delhi Call girls
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Servicesexy call girls service in goa
 
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...Escorts Call Girls
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceDelhi Call girls
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Sheetaleventcompany
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024APNIC
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxellan12
 
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night StandHot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Standkumarajju5765
 
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...Delhi Call girls
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Delhi Call girls
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)Damian Radcliffe
 

Recently uploaded (20)

Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
 
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
 
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
 
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
 
Russian Call Girls in %(+971524965298 )# Call Girls in Dubai
Russian Call Girls in %(+971524965298  )#  Call Girls in DubaiRussian Call Girls in %(+971524965298  )#  Call Girls in Dubai
Russian Call Girls in %(+971524965298 )# Call Girls in Dubai
 
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
 
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night StandHot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
 
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
 
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
 
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)
 

Pemrograman Jaringan

  • 2. Java Program  Java source di buat − pakai text editor dan disimpan dengan nama sesuai nama class (Case Sensitive) dan ekstensi .java  Di compile menghasilkan Byte code dengan nama sesuai nama class (Case Sensitive) dan ekstensi .class − Memerlukan java compiler yang tersedia di JDK  Byte code di jalankan menggunakan JVM − JVM diperoleh dalam paket JRE atau JDK
  • 3. Client – Server  Bentuk komunikasi menggunakan model client server  Program yang dibuat harus terdiri dari client dan server  Server bersifat pasif, program yang menunggu  Client bersifat aktif, program yang menghubungi server  P2P juga mempunyai client dan server
  • 4. Komunikasi Antar Aplikasi  IPC = Komunikasi antar proses − Shared memory − Message Passing di jaringan  Socket  RPC/RMI  Socket dibuat berdasarkan pasangan alamat IP dan port yang dipakai/dipilih  Alamat IP sering digantikan oleh nama host  port adalah bilangan 1 – 65535 untuk tcp/udp
  • 5. Socket  Socket adalah representasi dari gerbang komunikasi di jaringan  Socket bekerja layaknya layanan I/O Unix seperti akses file, pipe dan FIFO. − fd = fopen --> fd adalah file descriptor  Socket berfungsi untuk: − Meng establish koneksi, dan − Menentukan alamat untuk gerbang komunikasi
  • 6. Port  Socket dibuat menggunakan pasangan port dan ip address  Port untuk transport layer (untuk 1 aplikasi diperjanjikan 1 port tententu) − 16 bit --> nilainya 1 – 65535  Ip address network layer
  • 7. Sockets dan Ports message agreed port any port socketsocket Internet address = 138.37.88.249Internet address = 138.37.94.248 other ports client server Client creates socket sends to addr/port Server creates socket binds to port advertises addr/port
  • 8. Multiplex-demultiplex di jaringan Aplikasi 2Aplikasi 1 Aplikasi 4Aplikasi 3 TCP/UDP Lainnya IP ... Ethernet Lainnya... Netbios RPC
  • 9. Java net API  Socket di Java dibedakan dalam 3 macam: − Socket client untuk TCP (stream)  java.net.Socket − Socket server untuk TCP (stream)  java.net.ServerSocket − Socket datagram untuk UDP  java.net.DatagramSocket
  • 10. Client socket  public Socket(String host, int port) throws UnknownHostException, IOException  Contoh: try { Socket toOReilly = new Socket("www.oreilly.com", 80); // send and receive data... } catch (UnknownHostException ex) { System.err.println(ex); } catch (IOException ex) { System.err.println(ex);
  • 11. Class SocketAddress dan connect package java.net.*; public abstract class SocketAddress { public SocketAddress( ) {} } public SocketAddress getRemoteSocketAddress( ) public SocketAddress getLocalSocketAddress( ) A SocketAddress is necessary to connect an unconnected socket via the connect( ) method: public void connect(SocketAddress endpoint) throws IOException
  • 12. Server socket  public ServerSocket(int port) throws BindException, IOException  public ServerSocket(int port, int queueLength) throws BindException, IOException  public ServerSocket(int port, int queueLength, InetAddress bindAddress) throws IOException  public ServerSocket( ) throws IOException // Java 1.4
  • 13. Step utk Program Client TCP  Create a Socket object. − Socket client = new Socket("hostname", portNumber);  Create an output stream that can be used to send information to the Socket. − PrintWriter out = new PrintWriter(client.getOutputStream(), true);  Create an input stream to read the response from the server. − InputStreamReader in = new InputStreamReader(client.getInputStream());  Do I/O with input and output streams.  Close the Socket when done. − client.close();
  • 14. Program Client untuk TCP import java.net.*; import java.io.*; public class DaytimeClient { public static void main(String[] args) { String hostname; if (args.length > 0) { hostname = args[0]; } else { hostname = "tock.usno.navy.mil"; } try { Socket theSocket = new Socket(hostname, 13); InputStream timeStream = theSocket.getInputStream(); StringBuffer time = new StringBuffer();
  • 15. Program Client untuk TCP int c; while ((c = timeStream.read()) != -1) time.append((char) c); String timeString = time.toString().trim(); System.out.println("It is " + timeString + " at " + hostname); } // end try catch (UnknownHostException e) { System.err.println(e); } catch (IOException e) { System.err.println(e); } } // end main } // end DaytimeClient
  • 16. Step utk Program Server TCP  Create a ServerSocket object. − ServerSocket listenSocket = new ServerSocket(portNumber);  Create a Socket object from the ServerSocket (accept connection) − Socket server = listenSocket.accept();  Create an input stream to read input from the client − BufferedReader in = new BufferedReader (new InputStreamReader(server.getInputStream()));  Create an output stream that can be used to send information back to the client − PrintWriter out = new PrintWriter(server.getOutputStream());  Do I/O with input and output streams.  Close the Socket when done. − server.close();
  • 17. Program Server untuk TCP import java.net.*; import java.io.*; import java.util.Date; public class DaytimeServer { public final static int DEFAULT_PORT = 13; public static void main(String[] args) { int port = DEFAULT_PORT; if (args.length > 0) { try { port = Integer.parseInt(args[0]); if (port < 1 || port > 65535) { System.out.println("Port must between 1 and 65535"); return; } }
  • 18. Program Server untuk TCP catch (NumberFormatException ex) { // use default port } } try { ServerSocket server = new ServerSocket(port); Socket connection = null; while (true) { try { connection = server.accept(); Writer out = new OutputStreamWriter(connection.getOutputStream()); Date now = new Date(); out.write(now.toString() +"rn"); out.flush(); connection.close(); }
  • 19. Program Server untuk TCP catch (IOException ex) {} finally { try { if (connection != null) connection.close(); } catch (IOException ex) {} } } // end while } // end try catch (IOException ex) { System.err.println(ex); } // end catch } // end main } // end DaytimeServer
  • 20. Client UDP import java.net.*; import java.io.*; public class UDPDiscardClient { public final static int DEFAULT_PORT = 9; public static void main(String[] args) { String hostname; int port = DEFAULT_PORT; if (args.length > 0) { hostname = args[0]; try { port = Integer.parseInt(args[1]); } catch (Exception ex) { // use default port } } else { hostname = "localhost"; }
  • 21. Client UDP try { InetAddress server = InetAddress.getByName(hostname); BufferedReader userInput = new BufferedReader(new InputStreamReader(System.in)); DatagramSocket theSocket = new DatagramSocket(); while (true) { String theLine = userInput.readLine(); if (theLine.equals(".")) break; byte[] data = theLine.getBytes(); DatagramPacket theOutput = new DatagramPacket(data, data.length, server, port); theSocket.send(theOutput); } // end while } catch (UnknownHostException uhex) { System.err.println(uhex); } catch (SocketException sex) { System.err.println(sex); } catch (IOException ioex) { System.err.println(ioex); } } // end main }
  • 22. Server UDP import java.net.*; import java.io.*; public class UDPDiscardServer { public final static int DEFAULT_PORT = 9; public final static int MAX_PACKET_SIZE = 65507; public static void main(String[] args) { int port = DEFAULT_PORT; byte[] buffer = new byte[MAX_PACKET_SIZE]; try { port = Integer.parseInt(args[0]); } catch (Exception ex) { // use default port }
  • 23. Server UDP try { DatagramSocket server = new DatagramSocket(port); DatagramPacket packet = new DatagramPacket(buffer, buffer.length); while (true) { try { server.receive(packet); String s = new String(packet.getData(), 0, packet.getLength()); System.out.println(packet.getAddress() + " at port " + packet.getPort() + " says " + s); // reset the length for the next packet packet.setLength(buffer.length); } catch (IOException ex) { System.err.println(ex); } } // end while } catch (SocketException ex) { System.err.println(ex); } // end catch } // end main }
  • 24. 15 July 2002 © John H. Hine 2002 24 UDP Socket Structure Client process Server process server socket client socketresponse request host name port number
  • 25. 15 July 2002 © John H. Hine 2002 25 UDP Steps Server (on hostId) Create socket with port = x Publish “hostId, port=x” Read request from socket Write reply to socket Close socket Client Create socket Create address (hostId, port=x) Send request on client socket Read reply from client socket Close client socket
  • 26. 15 July 2002 © John H. Hine 2002 26 C Client - create a socket #define DATA "The sea is calm tonight, the tide is full . . .” main(argc, argv) int argc; char *argv[ ]; { int sock; struct sockaddr_in name; struct hostent *hp, *gethostbyname(); /* Create socket on which to send. */ sock = socket(AF_INET, SOCK_DGRAM, 0); if (sock < 0) { perror("opening datagram socket"); exit(1); } struct sockaddr_in { short sin_family; u_short sin_port; struct in_addr sin_addr; char sin_zero[8]; }; Internet socket UDP (datagram)
  • 27. 15 July 2002 © John H. Hine 2002 27 C Client - Send The Message hp = gethostbyname(argv[1]); if (hp == 0) { fprintf(stderr, "%s: unknown hostn", argv[1]); exit(2); } bcopy(hp->h_addr, &name.sin_addr, hp->h_length); name.sin_family = AF_INET; name.sin_port = htons(atoi(argv[2])); /* Send message. */ if (sendto(sock, DATA, sizeof(DATA), 0, &name, sizeof(name)) < 0) perror("sending datagram message"); close(sock); } server domain name port number
  • 28. 15 July 2002 © John H. Hine 2002 28 C UDP Server - create socket main() { int sock, length; struct sockaddr_in name; char buf[1024]; /* Create socket from which to read. */ sock = socket(AF_INET, SOCK_DGRAM, 0); if (sock < 0) { perror("opening datagram socket"); exit(1); } Internet socket UDP (datagram)
  • 29. 15 July 2002 © John H. Hine 2002 29 C UDP Server - bind to port /* Create name with wildcards. */ name.sin_family = AF_INET; name.sin_addr.s_addr = INADDR_ANY; name.sin_port = 0; if (bind(sock, &name, sizeof(name))) { perror("binding datagram socket"); exit(1); } accept connections from assign default port number
  • 30. 15 July 2002 © John H. Hine 2002 30 C UDP Server - Read the data /* Find assigned port value and print it out. */ length = sizeof(name); if (getsockname(sock, &name, &length)) { perror("getting socket name"); exit(1); } printf("Socket has port #%den", ntohs(name.sin_port)); /* Read from the socket */ if (read(sock, buf, 1024) < 0) perror("receiving datagram packet"); printf("-->%sen", buf); close(sock); }
  • 31. 17 July 2002 © John H. Hine 2002 31 RPC interface definition IDL compiler client stub header server stub client source server source C compilerC compiler server stub object server object C compiler C compiler client object client stub object ravg.c avg_proc.c avg.x avg_clnt.c avg.h avg_svc.c avg_xdr.c ravg avg_svc
  • 32. 17 July 2002 © John H. Hine 2002 32 Passing Value Parameters  Steps involved in doing remote computation through RPC 2-8
  • 33. RPC  avg.x --> interface specification − Setelah di compile pakai rpcgen, menghasilkan − avg.h, avg_xdr.c, avg_clnt.c, avg_svc.c  avg_proc.c --> procedure di server  ravg.c --> main program di client  Di compile dengan cara: − Client: cc -o ravg ravg.c avg_xdr.c avg_clnt.c − ravg − Server: cc -o avg_svc avg_proc.c avg_xdr.c avg_svc.c − avg_svc
  • 34. avg.x const MAXAVGSIZE = 200; struct input_data { double input_data<200>; }; typedef struct input_data input_data; program AVERAGEPROG { version AVERAGEVERS { double AVERAGE(input_data) = 1; } = 1; } = 22855;
  • 35. Client: ravg.c #include "avg.h" #include <stdlib.h> void averageprog_1( char* host, int argc, char *argv[]) { CLIENT *clnt; double *result_1, *dp, f; char *endptr; int i; input_data average_1_arg; average_1_arg.input_data.input_data_val = (double*) malloc(MAXAVGSIZE*sizeof(double)); dp = average_1_arg.input_data.input_data_val; average_1_arg.input_data.input_data_len = argc - 2;
  • 36. Client: ravg.c for (i=1;i<=(argc - 2);i++) { f = strtod(argv[i+1],&endptr); printf("value = %en",f); *dp = f; dp++; } clnt = clnt_create(host, AVERAGEPROG, argv[0]); exit(1); } if(argc > MAXAVGSIZE + 2) { printf("Two many input valuesn"); exit(2);
  • 37. Server: avg_proc.c #include <rpc/rpc.h> #include "avg.h" #include <stdio.h> static double sum_avg; double * average_1(input_data *input, CLIENT *client) { double *dp = input->input_data.input_data_val; u_int i; sum_avg = 0; for(i=1;i<=input->input_data.input_data_len;i++) { sum_avg = sum_avg + *dp; dp++; }
  • 38. Server: avg_proc.c sum_avg = sum_avg / input->input_data.input_data_len; return(&sum_avg); } double * average_1_svc(input_data *input, struct svc_req *svc) { CLIENT *client; return(average_1(input,client)); }
  • 39. Running RPC Menjalankan server: avg_svc & menjalankan client: ravg server 2 3 4 5 hasilnya value = 2.000000e+00 value = 3.000000e+00 value = 4.000000e+00 value = 5.000000e+00 average = 3.500000e+00 bila berhasil
  • 40. Aplikasi yang menerapkan RPC  NFS (Network File System)  NIS (Network Information System) − YP (Yellow Pages)
  • 41. Bentuk Komunikasi  Unicast --> TCP − Satu tujuan  Broadcast --> UDP − Semua tujuan − Semua host pada jaringan A, B, dan C akan menerima  Multicast --> bentuk khusus dari UDP − Banyak tujuan yang dipilih − Misal pada jaringan A dipilih 5 dari 20, jaringan B dipilih 3 dari 10, dan jaringan C dipilih 2 dari 6 − Jumlah hosts dari jaringan A, B, dan C ada 36, namun yang dipilih hanya 10
  • 42. Multicast socket  Class MulticastSocket merupakan subclass dari DatagramSocket public class MulticastSocket extends DatagramSocket  Pemanggilan class tanpa parameter public MulticastSocket( ) throws SocketException  Pemanggilan class dengan parameter port public MulticastSocket(int port) throws SocketException  Pemanggilan class dengan parameter SocketAddress public MulticastSocket(SocketAddress bindAddress) throws IOException
  • 43. Contoh pemanggilan try { MulticastSocket ms = new MulticastSocket( ); // send some datagrams... } catch (SocketException se) { System.err.println(se); } try { MulticastSocket ms = new MulticastSocket(4000); // receive incoming datagrams... } catch (SocketException ex) { System.err.println(ex); }
  • 44. Contoh pemanggilan try { SocketAddress address = new InetSocketAddress(4000); MulticastSocket ms = new MulticastSocket(address); // receive incoming datagrams... } catch (SocketException ex) { System.err.println(ex); }
  • 45. Java RMI  Interface --> Fibonacci.java  Class untuk implementasi dari interface − FibonacciImpl.java  Class untuk register server nya − FibonacciServer.java  Class untuk client − FibonacciClient.java
  • 46. Meng compile RMI  Seluruh class di compile dengan cara javac Fibonacci*.java  Hasil compile dari class Implementasi server (file .class nya) di compile lagi untuk menghasilkan skeleton dan stub dengan cara rmic FibonacciImpl
  • 47. Menjalankan Java RMI  Menjalankan rmiregistry dengan cara start rmiregistry --> di Windows atau rmiregistry & --> di Linux  Menjalankan server dengan cara java FibonacciServer  Menjalankan client dengan cara java FibonacciClient rmi://host.com/fibonacci 0 1 2 3 4 5  Hasil outputnya: The 0th Fibonacci number is 1 The 1th Fibonacci number is 1 The 2th Fibonacci number is 2 The 3th Fibonacci number is 3 The 4th Fibonacci number is 5 The 5th Fibonacci number is 8
  • 48.  Pemrograman berbasis Socket, aplikasi yang dibuat  langsung menggunakan transport (TCP/UDP) -->  layer 4 = identik dengan low level programming  Pemrograman berbasis RPC/RMI, aplikasi yang  dibuat tidak mengakses langsung ke transport  melainkan melalui perantaraan RPC/RMI (layer 5 dan  6) = midle level programming  Pemrograman berbasis Web, aplikasi di buat di atas  aplikasi Web (layer 7) = high level programming
  • 49. Arsitektur Web Web Browser Web Server URL via HTTP HTML via HTTP Client Server
  • 50. Web Programming  Program di jalan kan di Web Browser (di Client) − Dibuat menggunakan bahasa pemrograman − Java (Applet) atau bahasa scripting Javascript  Program di jalan kan di Web Server (di Server)
  • 51. Client side program  Program diambil dari server bersama-sama dengan html nya dan di jalan kan di client  Menggunakan Javascript atau Java Applet
  • 52. Server Side Program  Memakai: CGI dengan bahasa apa saja (c++ dan perl/python, ASP, Java Servlet, dan PHP

Editor's Notes

  1. We turn our attention briefly to how programs connect to networks, including how we do it from a program. Port - the external (network) interface for a program. IP addr and port uniquely identify connect point. Socket - the internal (OS) interface to the network. Programs send and receive on sockets, but address messages to ports.
  2. Let’s look in detail at an example using UDP. Both client and server create sockets. The server must somehow make its address available to the client. We’ll discuss how this might be done later. The client sends a request to the server. This carries the return address. The server responds.
  3. Both processes create a socket and then use it to communicate. A server can publish its address in a number of different ways: 1) Well known 2) A name server 3) “Word of mouth”
  4. #include &amp;lt;sys/types.h&amp;gt; #include &amp;lt;sys/socket.h&amp;gt; #include &amp;lt;netinet/in.h&amp;gt; #include &amp;lt;netdb.h&amp;gt; #include &amp;lt;stdio.h&amp;gt; /* * Here we send a datagram to a server whose name comes from the * command line arguments. The form of the command line is * dgramsend hostname portnumber * In the included file &amp;lt;netinet/in.h&amp;gt; a sockaddr_in is defined as follows: * struct sockaddr_in { * short sin_family; // protocol family, e.g. Inet or Novell * u_short sin_port; // port number * struct in_addr sin_addr; // IP address * char sin_zero[8]; // flags * }; */
  5. /* * Construct name, with no wildcards, of the socket to send to. * Getnostbyname() returns a structure including the network address * of the specified host. The port number is taken from the command * line. */ Note the use of sendto() rather than write.
  6. #include &amp;lt;sys/types.h&amp;gt; #include &amp;lt;sys/socket.h&amp;gt; #include &amp;lt;netinet/in.h&amp;gt; #include &amp;lt;stdio.h&amp;gt; /* * This program creates a datagram socket, binds a name to it, then * reads from the socket. */
  7. Unlike the client the server must bind its socket to a port to allow the client to connect. This is done by partially filling in the sockaddr_in struct and passing it to bind.
  8. In the top half we now pass the sockaddr_in struct to getsockname and it fills in the port number for us. We then simply read from the socket. This blocks until some data arrives (as it would with standard input).
  9. We start with three files, source files for the client and server and an interface definition file written in an interface definition language. We first compile the idl file with an idl compiler. This generates both proxies (stubs) and a header file that is then included in the source of the client and server (providing the interface definition). These files are then all compiled - the header is included by all four source files - to generate object files. The client’s object files are linked with any library, and so are the servers. What do the proxies do?
  10. Rpc tries to deal with heterogeneous client and server by passing parameters/results in a way that allows them to be accurately reconstructed. This means the interface definition language must have types and it also means that the types passed must be found in/composed of the types of the IDL. The process at the calling end is call “marshalling”. Note that the client stub must also identify the procedure to be called (“add”). The rpc runtime on the server side will most likely support a number of remote procedures and it must know which one this invocation is destinged for. (The network port number is a well know port for the rpc runtime.) The server runtime passes the message to the appropriate stub with uses the parameters to make a local call to the procedure. What if the two machines involved use different representations for the integers? Message uses a standard format (e.g. big endian, little endian or bcd encoding).