Rappels programma,on réseau Java- suite. C. Delporte M2- Internet Rappel Java 1
|
|
|
- Poppy Merritt
- 10 years ago
- Views:
Transcription
1 Rappels programma,on réseau Java- suite C. Delporte M2- Internet Rappel Java 1
2 Socket programming Two socket types for two transport services: UDP: unreliable datagram TCP: reliable, byte stream-oriented C. Delporte M2-Internet Rappel Java 2-2
3 Socket UDP Socket SSL C. Delporte M2- Internet Rappel Java 3
4 Classes java.net.datagrampacket java.net.datagramsocket java.net.mul1castsocket java.net.serversocket javax.net.ssl.sslserversocket java.net.socket javax.net.ssl.sslsocket C. Delporte M2- Internet Rappel Java 4
5 Socket UDP C. Delporte M2-Internet Rappel Java 1-5
6 UDP C. Delporte M2-Internet Rappel Java 6
7 DatagramPacket q Un paquet contient au plus 65,507 bytes q Pour construire les paquets v public DatagramPacket(byte[] buffer, int length) v public DatagramPacket(byte[] buffer, int offset, int length) q Pour construire et envoyer v public DatagramPacket(byte[] data, int length, InetAddress destination, int port) v public DatagramPacket(byte[] data, int offset, int length, InetAddress destination, int port) v public DatagramPacket(byte[] data, int length, SocketAddress destination, int port) v public DatagramPacket(byte[] data, int offset, int length, SocketAddress destination, int port) C. Delporte M2-Internet Rappel Java 7
8 Exemple String s = "On essaie "; byte[] data = s.getbytes("ascii"); try { InetAddress ia = InetAddress.getByName(" int port = 7;// existe-t-il? DatagramPacket dp = new DatagramPacket(data, data.length, ia, port); catch (IOException ex) C. Delporte M2-Internet Rappel Java 8
9 Méthodes q Adresses v public InetAddress getaddress( ) v public int getport( ) v public SocketAddress getsocketaddress( ) v public void setaddress(inetaddress remote) v public void setport(int port) v public void setaddress(socketaddress remote) C. Delporte M2-Internet Rappel Java 9
10 Méthodes (suite) q Manipulation des données: v public byte[] getdata( ) v public int getlength( ) v public int getoffset( ) v public void setdata(byte[] data) v public void setdata(byte[] data, int offset, int length ) v public void setlength(int length) C. Delporte M2-Internet Rappel Java 10
11 Exemple import java.net.*; public class DatagramExample { public static void main(string[] args) { String s = "Essayons."; byte[] data = s.getbytes( ); try { InetAddress ia = InetAddress.getByName(" int port =7; DatagramPacket dp = new DatagramPacket(data, data.length, ia, port); System.out.println(" Un packet pour" + dp.getaddress( ) + " port " + dp.getport( )); System.out.println("il y a " + dp.getlength( ) + " bytes dans le packet"); System.out.println( new String(dp.getData( ), dp.getoffset( ), dp.getlength( ))); catch (UnknownHostException e) { System.err.println(e); C. Delporte M2-Internet Rappel Java 11
12 DatagramSocket q Constructeurs v public DatagramSocket( ) throws SocketException v public DatagramSocket(int port) throws SocketException v public DatagramSocket(int port, InetAddress interface) throws SocketException v public DatagramSocket(SocketAddress interface) throws SocketException v (protected DatagramSocket(DatagramSocketImpl impl) throws SocketException) C. Delporte M2-Internet Rappel Java 12
13 Exemple java.net.*; public class UDPPortScanner { public static void main(string[] args) { for (int port = 1024; port <= 65535; port++) { try { // exception si utilisé DatagramSocket server = new DatagramSocket(port); server.close( ); catch (SocketException ex) { System.out.println("Port occupé" + port + "."); // end try // end for C. Delporte M2-Internet Rappel Java 13
14 Envoyer et recevoir q public void send(datagrampacket dp) throws IOException q public void receive(datagrampacket dp) throws IOException C. Delporte M2-Internet Rappel Java 14
15 Un exemple: Echo q UDPServeur v UDPEchoServeur q UDPEchoClient SenderThread ReceiverThread C. Delporte M2-Internet Rappel Java 15
16 Echo: UDPServeur import java.net.*; import java.io.*; public abstract class UDPServeur extends Thread { private int buffersize; protected DatagramSocket sock; public UDPServeur(int port, int buffersize) throws SocketException { this.buffersize = buffersize; this.sock = new DatagramSocket(port); public UDPServeur(int port) throws SocketException { this(port, 8192); public void run() { byte[] buffer = new byte[buffersize]; while (true) { DatagramPacket incoming = new DatagramPacket(buffer, buffer.length); try { sock.receive(incoming); this.respond(incoming); catch (IOException e) { System.err.println(e); // end while public abstract void respond(datagrampacket request); C. Delporte M2-Internet Rappel Java 16
17 UDPEchoServeur public class UDPEchoServeur extends UDPServeur { public final static int DEFAULT_PORT = 2222; public UDPEchoServeur() throws SocketException { super(default_port); public void respond(datagrampacket packet) { try { byte[] data = new byte[packet.getlength()]; System.arraycopy(packet.getData(), 0, data, 0, packet.getlength()); try { String s = new String(data, "8859_1"); System.out.println(packet.getAddress() + " port " + packet.getport() + " reçu " + s); catch (java.io.unsupportedencodingexception ex) { DatagramPacket outgoing = new DatagramPacket(packet.getData(), packet.getlength(), packet.getaddress(), packet.getport()); sock.send(outgoing); catch (IOException ex) { System.err.println(ex); C. Delporte M2-Internet Rappel Java 17
18 Client: UDPEchoClient public class UDPEchoClient { public static void lancer(string hostname, int port) { try { InetAddress ia = InetAddress.getByName(hostname); SenderThread sender = new SenderThread(ia, port); sender.start(); Thread receiver = new ReceiverThread(sender.getSocket()); receiver.start(); catch (UnknownHostException ex) { System.err.println(ex); catch (SocketException ex) { System.err.println(ex); // end lancer C. Delporte M2-Internet Rappel Java 18
19 ReceiverThread class ReceiverThread extends Thread { DatagramSocket socket; private boolean stopped = false; public ReceiverThread(DatagramSocket ds) throws SocketException { this.socket = ds; public void halt() { this.stopped = true; public DatagramSocket getsocket(){ return socket; public void run() { byte[] buffer = new byte[65507]; while (true) { if (stopped) return; DatagramPacket dp = new DatagramPacket(buffer, buffer.length); try { socket.receive(dp); String s = new String(dp.getData(), 0, dp.getlength()); System.out.println(s); Thread.yield(); catch (IOException ex) {System.err.println(ex); C. Delporte M2-Internet Rappel Java 19
20 SenderThread public class SenderThread extends Thread { private InetAddress server; private DatagramSocket socket; private boolean stopped = false; private int port; public SenderThread(InetAddress address, int port) throws SocketException { this.server = address; this.port = port; this.socket = new DatagramSocket(); this.socket.connect(server, port); public void halt() { this.stopped = true; // C. Delporte M2-Internet Rappel Java 20
21 SenderThread // public DatagramSocket getsocket() { return this.socket; public void run() { try { BufferedReader userinput = new BufferedReader(new InputStreamReader(System.in)); while (true) { if (stopped) return; String theline = userinput.readline(); if (theline.equals(".")) break; byte[] data = theline.getbytes(); DatagramPacket output = new DatagramPacket(data, data.length, server, port); socket.send(output); Thread.yield(); // end try catch (IOException ex) {System.err.println(ex); // end run C. Delporte M2-Internet Rappel Java 21
22 Autres méthodes q public void close( ) q public int getlocalport( ) q public InetAddress getlocaladdress( ) q public SocketAddress getlocalsocketaddress( ) q public void connect(inetaddress host, int port) q public void disconnect( ) q public int getport( ) q public InetAddress getinetaddress( ) q public InetAddress getremotesocketaddress( ) C. Delporte M2-Internet Rappel Java 22
23 Options q SO_TIMEOUT v public synchronized void setsotimeout(int timeout) throws SocketException v public synchronized int getsotimeout( ) throws IOException q SO_RCVBUF v public void setreceivebuffersize(int size) throws SocketException v public int getreceivebuffersize( ) throws SocketException q SO_SNDBUF v public void setsendbuffersize(int size) throws SocketException v int getsendbuffersize( ) throws SocketException q SO_REUSEADDR (plusieurs sockets sur la même adresse) v public void setreuseaddress(boolean on) throws SocketException v boolean getreuseaddress( ) throws SocketException q SO_BROADCAST v public void setbroadcast(boolean on) throws SocketException v public boolean getbroadcast( ) throws SocketException C. Delporte M2-Internet Rappel Java 23
24 Multicast socket (UDP) C. Delporte M2-Internet Rappel Java 1-24
25 public class Mul1castSocket extends DatagramSocket Constructeur: Mul,castSocket() Mul,castSocket(int port) C. Delporte M2- Internet Rappel Java 25
26 Groupe formé sur une adresse IP de classe D Classe D: entre et ) Adresse réservée Méthodes ges,on groupe void joingroup(inetaddress mcastaddr) void leavegroup(inetaddress mcastaddr) C. Delporte M2- Internet Rappel Java 26
27 Exemple InetAddress mul,castaddress ; // Une adresse IP speciale Mul,castSocket socket ; /* crea,on: */ socket = new Mul,castSocket (port) ; /* Adresse IP mul,cast pour envoyer dans le reseau local : */ mul,castaddress = InetAddress.getByName (" ") ; /* Indiquer qu'on veut recevoir les paquets a des,na,on de ce]e adresse de groupe : */ socket.joingroup (mul,castaddress) ; C. Delporte M2-Internet Rappel Java 1-2
28 Exemple ( suite) ByteBuffer b = ByteBuffer.allocate(1400) ; String msg = "envoi" ; b.put (msg.getbytes()) ; b.flip () ; /* limit devient la posi,on courante et posi,on est mis a 0 */ /* Le paquet : Une adresse IP, un port et des octets... */ DatagramPacket datagram = new DatagramPacket (b.array(), b.limit()) ; SocketAddress dest = new InetSocketAddress (mul,castaddress, port) ; datagram.setsocketaddress (dest) ; try { socket.send (datagram) ; catch (IOExcep,on e) { System.err.println (e) ; C. Delporte M2-Internet Rappel Java 1-2
29 Secure Socket Layer (SSLSocket) Package javax.net.ssl.*; C. Delporte M2-Internet Rappel Java 1-29
30 public abstract class SSLSocket extends Socket Stream sockets Fournit des services de sécurité: Authen,fica,on : le serveur est authen,fié, le client peut l être Confiden,alité: le message transmis est encrypté Intégrité: le message n est pas altéré C. Delporte M2- Internet Rappel Java 30
31 q Ces protections sont specifiées dans une «cypher suite» q Mécanisme de poignée de mains(handshake)pour se mettre d accord sur le chiffrage utilisé ( si pas de chiffrage commun pas de données échangées). Le but de ce processus est d établir une session C. Delporte M2-Internet Rappel Java 1-31
32 q Initiation du handshake: v StartHandshake() v Tout read ou write v getsession() q Mais pas à la création de la socket : permet de choisir une «cypher suite» autre que le défaut C. Delporte M2-Internet Rappel Java 1-3
33 U,lise un système : de cryptographie asymétrique ( type RSA) pour l authen,fica,on et l obten,on de clef de cryptage symétrique de cryptographie symétrique ( type DES) pour la communica,on C. Delporte M2- Internet Rappel Java 33
34 Coté serveur Une paire de clefs cryptographique (clef public, clef privée) Ces clefs sont stockées dans un «magasin» ( keystore) dans une structure de données protégée par un mot de passe keytool est un ou,l de ges,on de cer,ficats et de clefs C. Delporte M2- Internet Rappel Java 34
35 Coté client Il faut un «magasin» de clef en qui on a confiance ( truststore) contenant le cer,ficat correspondant à la clef public du serveur keytool permet d extraire le cer,ficat du magasin serveur et de l importer dans le magasin du client C. Delporte M2- Internet Rappel Java 35
36 Cer,ficat Coté serveur: Créa,on d une clef privée/public pour le serveur keytool - genkey - keystore server.jks - alias server - keyalg RSA (demande un mot de passe et autres infos) Extrac,on de la clef public keytool - export - keystore server.jks - alias server - file server.crt C. Delporte M2- Internet Rappel Java 36
37 Cer,ficat Cote client ( qui dispose de server.crt) keytool - import - alias server - file server.crt - keystore client.jsk C. Delporte M2- Internet Rappel Java 37
38 Coté serveur System.setProperty("javax.net.ssl.keyStore", "server.jsk"); System.setProperty("javax.net.ssl.keyStorePassword ", "123456"); ( mot de passe) Ou java -Djavax.net.ssl.keyStore=server.jsk - Djavax.net.ssl.keyStorePassword= SecureServer C. Delporte M2-Internet Rappel Java 1-3
39 Coté client System.setProperty("javax.net.ssl.trustStore", "client.jsk"); System.setProperty("javax.net.ssl.trustStorePasswo rd", "123456"); ( mot de passe) Ou java -Djavax.net.ssl.trustStore=client.jsk -Djavax.net.ssl.trustStorePassword= SecureClient C. Delporte M2-Internet Rappel Java 1-3
40 1. Client Hello à 2. ß Serveur Hello 3. ß Cer,ficate 4. ß 5. ß Server Hello done C. Delporte M2- Internet Rappel Java 40
41 1. Client Key exchange à 2.. à 3. Finished à 4. Encrypted Data ß à 5. Close Messages ß à C. Delporte M2- Internet Rappel Java 41
42 Création socket q Coté serveur SSLServerSocketFactory socketfactory = (SSLServerSocketFactory) SSLServerSocketFactory.getDefault(); SSLServerSocket serversocket = (SSLServerSocket) socketfactory.createserversocket(port); q Coté Client SSLSocketFactory socketfactory = (SSLSocketFactory) SSLSocketFactory.getDefault(); SSLSocket socket = (SSLSocket)socketFactory.createSocket(site, port); C. Delporte M2-Internet Rappel Java 1-4
43 SecureClient.java (echo) import java.io.*; import javax.net.ssl.*; class SecureClient { public static void main(string args[]) { System.setProperty("javax.net.ssl.trustStore", "moncertif"); System.setProperty("javax.net.ssl.trustStorePassword", "123456"); try { SSLSocketFactory socketfactory = (SSLSocketFactory) SSLSocketFactory.getDefault(); SSLSocket socket = (SSLSocket) socketfactory.createsocket("localhost", 1664); PrintWriter output = new PrintWriter(new OutputStreamWriter(socket.getOutputStream())); String camarche = "ca marche! "; output.println(camarche); output.flush(); BufferedReader input = new BufferedReader(new InputStreamReader(socket.getInputStream())); String response = input.readline(); System.out.println(response); output.close(); input.close(); socket.close(); catch (IOException ioexception) {System.out.println(" SecureClient IOException "); finally {System.exit(0); C. Delporte M2-Internet Rappel Java 1-4
44 SecureServer.java import java.io.*; import javax.net.ssl.*; class SecureServer { private SSLServerSocket serversocket; public SecureServer() throws Exception { System.setProperty("javax.net.ssl.keyStore", "server.jsk"); System.setProperty("javax.net.ssl.keyStorePassword", "123456"); SSLServerSocketFactory socketfactory = (SSLServerSocketFactory) SSLServerSocketFactory.getDefault(); serversocket = (SSLServerSocket) socketfactory.createserversocket(1664); C. Delporte M2-Internet Rappel Java 1-4
45 SecureServer.java private void runserver() { while (true) { try { System.err.println(" Waiting for connection "); SSLSocket socket = (SSLSocket) serversocket.accept(); BufferedReader input = new BufferedReader(new InputStreamReader(socket.getInputStream())); PrintWriter output = new PrintWriter(new OutputStreamWriter(socket.getOutputStream())); String a=input.readline(); System.out.println("le serveur a eu "+a); output.println(" C est bon, " + a); output.close(); input.close(); socket.close(); catch (IOException ioexception) { public static void main(string args[]) throws Exception { System.err.println(" main for connection "); SecureServer server = new SecureServer(); server.runserver(); ; C. Delporte M2-Internet Rappel Java 1-4
Socket UDP. H. Fauconnier 1-1. M2-Internet Java
Socket UDP H. Fauconnier 1-1 M2-Internet Java UDP H. Fauconnier M2-Internet Java 2 Socket programming with UDP UDP: no connection between client and server no handshaking sender explicitly attaches IP
TP1 : Correction. Rappels : Stream, Thread et Socket TCP
Université Paris 7 M1 II Protocoles réseaux TP1 : Correction Rappels : Stream, Thread et Socket TCP Tous les programmes seront écrits en Java. 1. (a) Ecrire une application qui lit des chaines au clavier
Socket Programming in Java
Socket Programming in Java Learning Objectives The InetAddress Class Using sockets TCP sockets Datagram Sockets Classes in java.net The core package java.net contains a number of classes that allow programmers
CISC 4700 L01 Network & Client- Server Programming Spring 2016. Harold, Chapter 8: Sockets for Clients
CISC 4700 L01 Network & Client- Server Programming Spring 2016 Harold, Chapter 8: Sockets for Clients Datagram: Internet data packet Header: accounting info (e.g., address, port of source and dest) Payload:
NETWORK PROGRAMMING IN JAVA USING SOCKETS
NETWORK PROGRAMMING IN JAVA USING SOCKETS Prerna Malik, Poonam Rawat Student, Dronacharya College of Engineering, Gurgaon, India Abstract- Network programming refers to writing programs that could be processed
Creating a Simple, Multithreaded Chat System with Java
Creating a Simple, Multithreaded Chat System with Java Introduction by George Crawford III In this edition of Objective Viewpoint, you will learn how to develop a simple chat system. The program will demonstrate
Network Communication
Network Communication Outline Sockets Datagrams TCP/IP Client-Server model OSI Model Sockets Endpoint for bidirectional communication between two machines. To connect with each other, each of the client
Transport layer protocols. Message destination: Socket +Port. Asynchronous vs. Synchronous. Operations of Request-Reply. Sockets
Transport layer protocols Interprocess communication Synchronous and asynchronous comm. Message destination Reliability Ordering Client Server Lecture 15: Operating Systems and Networks Behzad Bordbar
SSC - Communication and Networking Java Socket Programming (II)
SSC - Communication and Networking Java Socket Programming (II) Shan He School for Computational Science University of Birmingham Module 06-19321: SSC Outline Outline of Topics Multicast in Java User Datagram
Java Programming: Sockets in Java
Java Programming: Sockets in Java Manuel Oriol May 10, 2007 1 Introduction Network programming is probably one of the features that is most used in the current world. As soon as people want to send or
Socket-based Network Communication in J2SE and J2ME
Socket-based Network Communication in J2SE and J2ME 1 C/C++ BSD Sockets in POSIX POSIX functions allow to access network connection in the same way as regular files: There are special functions for opening
Lesson: All About Sockets
All About Sockets http://java.sun.com/docs/books/tutorial/networking/sockets/index.html Page 1 sur 1 The Java TM Tutorial Start of Tutorial > Start of Trail Trail: Custom Networking Lesson: All About Sockets
Division of Informatics, University of Edinburgh
CS1Bh Lecture Note 20 Client/server computing A modern computing environment consists of not just one computer, but several. When designing such an arrangement of computers it might at first seem that
Network Programming using sockets
Network Programming using sockets TCP/IP layers Layers Message Application Transport Internet Network interface Messages (UDP) or Streams (TCP) UDP or TCP packets IP datagrams Network-specific frames Underlying
Data Communication & Networks G22.2262-001
Data Communication & Networks G22.2262-001 Session 10 - Main Theme Java Sockets Dr. Jean-Claude Franchitti New York University Computer Science Department Courant Institute of Mathematical Sciences 1 Agenda
Network-based Applications. Pavani Diwanji David Brown JavaSoft
Network-based Applications Pavani Diwanji David Brown JavaSoft Networking in Java Introduction Datagrams, Multicast TCP: Socket, ServerSocket Issues, Gotchas URL, URLConnection Protocol Handlers Q & A
ExempleRMI.java. // Fichier de defintion des droits et proprietes // System.setProperty("java.security.policy","../server.java.
ExempleRMI.java import java.lang.*; import java.rmi.registry.*; import java.rmi.server.*; import java.io.*; import java.util.*; ExempleRMI.java import pkgexemple.*; public class ExempleRMI public static
Abhijit A. Sawant, Dr. B. B. Meshram Department of Computer Technology, Veermata Jijabai Technological Institute
Network programming in Java using Socket Abhijit A. Sawant, Dr. B. B. Meshram Department of Computer Technology, Veermata Jijabai Technological Institute Abstract This paper describes about Network programming
Socket Programming. A er learning the contents of this chapter, the reader will be able to:
Java Socket Programming This chapter presents key concepts of intercommunication between programs running on different computers in the network. It introduces elements of network programming and concepts
The difference between TCP/IP, UDP/IP and Multicast sockets. How servers and clients communicate over sockets
Network Programming Topics in this section include: What a socket is What you can do with a socket The difference between TCP/IP, UDP/IP and Multicast sockets How servers and clients communicate over sockets
Socket Programming. Announcement. Lectures moved to
Announcement Lectures moved to 150 GSPP, public policy building, right opposite Cory Hall on Hearst. Effective Jan 31 i.e. next Tuesday Socket Programming Nikhil Shetty GSI, EECS122 Spring 2006 1 Outline
Langages Orientés Objet Java
Langages Orientés Objet Java Exceptions Arnaud LANOIX Université Nancy 2 24 octobre 2006 Arnaud LANOIX (Université Nancy 2) Langages Orientés Objet Java 24 octobre 2006 1 / 32 Exemple public class Example
Accessing PostgreSQL through JDBC via a Java SSL tunnel
LinuxFocus article number 285 http://linuxfocus.org Accessing PostgreSQL through JDBC via a Java SSL tunnel by Chianglin Ng About the author: I live in Singapore, a modern multiracial
Liste d'adresses URL
Liste de sites Internet concernés dans l' étude Le 25/02/2014 Information à propos de contrefacon.fr Le site Internet https://www.contrefacon.fr/ permet de vérifier dans une base de donnée de plus d' 1
Socket programming. Socket Programming. Languages and Platforms. Sockets. Rohan Murty Hitesh Ballani. Last Modified: 2/8/2004 8:30:45 AM
Socket Programming Rohan Murty Hitesh Ballani Last Modified: 2/8/2004 8:30:45 AM Slides adapted from Prof. Matthews slides from 2003SP Socket programming Goal: learn how to build client/server application
Java Network. Slides prepared by : Farzana Rahman
Java Network Programming 1 Important Java Packages java.net java.io java.rmi java.security java.lang TCP/IP networking I/O streams & utilities Remote Method Invocation Security policies Threading classes
CHAPTER 6. Transmission Control Protocol. 6.1 Overview
Reilly06.qxd 3/1/02 1:33 PM Page 141 CHAPTER 6 Transmission Control Protocol The Transmission Control Protocol (TCP) is a stream-based method of network communication that is far different from any discussed
Abstract Stream Socket Service
COM 362 Computer Networks I Lec 2: Applicatin Layer: TCP/UDP Socket Programming 1. Principles of Networks Applications 2. TCP Socket Programming 3. UDP Socket Programming Prof. Dr. Halûk Gümüşkaya [email protected]
DNS: Domain Names. DNS: Domain Name System. DNS: Root name servers. DNS name servers
DNS: Domain Name System DNS: Domain Names People: many identifiers: SSN, name, Passport # Internet hosts, routers: Always: IP address (32 bit) - used for addressing datagrams Often: name, e.g., nifc14.wsu.edu
Application Development with TCP/IP. Brian S. Mitchell Drexel University
Application Development with TCP/IP Brian S. Mitchell Drexel University Agenda TCP/IP Application Development Environment Client/Server Computing with TCP/IP Sockets Port Numbers The TCP/IP Application
Remote Method Invocation
1 / 22 Remote Method Invocation Jean-Michel Richer [email protected] http://www.info.univ-angers.fr/pub/richer M2 Informatique 2010-2011 2 / 22 Plan Plan 1 Introduction 2 RMI en détails
Network/Socket Programming in Java. Rajkumar Buyya
Network/Socket Programming in Java Rajkumar Buyya Elements of C-S Computing a client, a server, and network Client Request Result Network Server Client machine Server machine java.net Used to manage: URL
TP N 10 : Gestion des fichiers Langage JAVA
TP N 10 : Gestion des fichiers Langage JAVA Rappel : Exemple d utilisation de FileReader/FileWriter import java.io.*; public class Copy public static void main(string[] args) throws IOException File inputfile
Licence Informatique Année 2005-2006. Exceptions
Université Paris 7 Java Licence Informatique Année 2005-2006 TD n 8 - Correction Exceptions Exercice 1 La méthode parseint est spécifiée ainsi : public static int parseint(string s) throws NumberFormatException
Brazil + JDBC Juin 2001, [email protected] http://jfod.cnam.fr/tp_cdi/douin/
Brazil + JDBC Juin 2001, [email protected] http://jfod.cnam.fr/tp_cdi/douin/ version du 26 Mai 2003 : JDBC-SQL et Brazil pré-requis : lecture de Tutorial JDBC de Sun Bibliographie Brazil [Bra00]www.sun.com/research/brazil
Question1-part2 What undesirable consequences might there be in having too long a DNS cache entry lifetime?
CSCI 312 - DATA COMMUNICATIONS AND NETWORKS FALL, 2014 Assignment 4 Working as a group. Working in small gruops of 2-4 students. When you work as a group, you have to return only one home assignment per
Sockets. Programação de Sockets em Java. Socket Abstractions. Camada de Transporte
Sockets Programação de Sockets em Java Server ports lients user space TP/UDP Socket API TP/UDP kernel space IP IP Ethernet Adapter Ethernet Adapter hardware SISTEMAS INFORMÁTIOS I, ENG. BIOMÉDIA SLIDES_10
Learning Outcomes. Networking. Sockets. TCP/IP Networks. Hostnames and DNS TCP/IP
CP4044 Lecture 7 1 Networking Learning Outcomes To understand basic network terminology To be able to communicate using Telnet To be aware of some common network services To be able to implement client
CRYPTOGRAPHY 456 ANDROID SECURE FILE TRANSFER W/ SSL
CRYPTOGRAPHY 456 ANDROID SECURE FILE TRANSFER W/ SSL Daniel Collins Advisor: Dr. Wei Zhong Contents Create Key Stores and Certificates Multi-Threaded Android applications UI Handlers Creating client and
Java Network Programming. The java.net package contains the Socket class. This class speaks TCP (connection-oriented protocol).
Java Network Programming The java.net package contains the Socket class. This class speaks TCP (connection-oriented protocol). The DatagramSocket class uses UDP (connectionless protocol). The java.net.socket
Introduction to Java. Module 12: Networking (Java Sockets) Prepared by Costantinos Costa for EPL 233. ΕΠΛ233 Αντικειμενοστρεφής Προγραμματισμός 1
Introduction to Java Module 12: Networking (Java Sockets) Prepared by Costantinos Costa for EPL 233 ΕΠΛ233 Αντικειμενοστρεφής Προγραμματισμός 1 What Is a Socket? A socket is one end-point of a two-way
13 File Output and Input
SCIENTIFIC PROGRAMMING -1 13 File Output and Input 13.1 Introduction To make programs really useful we have to be able to input and output data in large machinereadable amounts, in particular we have to
Capario B2B EDI Transaction Connection. Technical Specification for B2B Clients
Capario B2B EDI Transaction Connection Technical Specification for B2B Clients Revision History Date Version Description Author 02/03/2006 Draft Explanation for external B2B clients on how to develop a
NAT & Secure Sockets SSL/ TLS. ICW: Lecture 6 Tom Chothia
NAT & Secure Sockets SSL/ TLS ICW: Lecture 6 Tom Chothia Network Address Translation How many IP address are there? Therefore 0.0.0.0 to 255.255.255.255 256*256*256*256 = 4 294 967 296 address Not enough
Mail User Agent Project
Mail User Agent Project Tom Kelliher, CS 325 100 points, due May 4, 2011 Introduction (From Kurose & Ross, 4th ed.) In this project you will implement a mail user agent (MUA) that sends mail to other users.
Note concernant votre accord de souscription au service «Trusted Certificate Service» (TCS)
Note concernant votre accord de souscription au service «Trusted Certificate Service» (TCS) Veuillez vérifier les éléments suivants avant de nous soumettre votre accord : 1. Vous avez bien lu et paraphé
Advanced Network Programming Lab using Java. Angelos Stavrou
Advanced Network Programming Lab using Java Angelos Stavrou Table of Contents A simple Java Client...3 A simple Java Server...4 An advanced Java Client...5 An advanced Java Server...8 A Multi-threaded
POB-JAVA Documentation
POB-JAVA Documentation 1 INTRODUCTION... 4 2 INSTALLING POB-JAVA... 5 Installation of the GNUARM compiler... 5 Installing the Java Development Kit... 7 Installing of POB-Java... 8 3 CONFIGURATION... 9
Brest. Backup : copy flash:ppe_brest1 running-config
Brest Backup : copy flash:ppe_brest1 running-config Cisco SF300-08 Mise en place des services : - Serveurs : 10.3.50.0/24 VLAN 2 (port 1) - DSI : 10.3.51.0/24 VLAN 3 (port 2) - Direction : 10.3.52.0/24
Application Note 704 Asynchronous Serial-to-Ethernet Device Servers
www.maxim-ic.com Application Note 704 Asynchronous Serial-to-Ethernet Device Servers OVERVIEW The sheer number of devices that use a serial port as a means for communicating with other electronic equipment
Transport Layer Services Mul9plexing/Demul9plexing. Transport Layer Services
Computer Networks Mul9plexing/Demul9plexing Transport services and protocols provide logical communica+on between app processes running on different hosts protocols run in end systems send side: breaks
Preface. Intended Audience
Preface For years, college courses in computer networking were taught with little or no hands on experience. For various reasons, including some good ones, instructors approached the principles of computer
Assignment 4 Solutions
CSCI 312 - DATA COMMUNICATIONS AND NETWORKS FALL, 2014 Assignment 4 Solutions Working as a pair Working in pairs. When you work as a pair you have to return only one home assignment per pair on a round.
Building a Multi-Threaded Web Server
Building a Multi-Threaded Web Server In this lab we will develop a Web server in two steps. In the end, you will have built a multi-threaded Web server that is capable of processing multiple simultaneous
Personnalisez votre intérieur avec les revêtements imprimés ALYOS design
Plafond tendu à froid ALYOS technology ALYOS technology vous propose un ensemble de solutions techniques pour vos intérieurs. Spécialiste dans le domaine du plafond tendu, nous avons conçu et développé
Introduction. GEAL Bibliothèque Java pour écrire des algorithmes évolutionnaires. Objectifs. Simplicité Evolution et coévolution Parallélisme
GEAL 1.2 Generic Evolutionary Algorithm Library http://dpt-info.u-strasbg.fr/~blansche/fr/geal.html 1 /38 Introduction GEAL Bibliothèque Java pour écrire des algorithmes évolutionnaires Objectifs Généricité
IPv6 Workshop: Location Date Security Trainer Name
: Location Date Trainer Name 1/6 Securing the servers 1 ) Boot on linux, check that the IPv6 connectivity is fine. 2 ) From application hands-on, a web server should be running on your host. Add filters
Communicating with a Barco projector over network. Technical note
Communicating with a Barco projector over network Technical note MED20080612/00 12/06/2008 Barco nv Media & Entertainment Division Noordlaan 5, B-8520 Kuurne Phone: +32 56.36.89.70 Fax: +32 56.36.883.86
String sentence = new String(receivePacket.getData()); InetAddress IPAddress = receivepacket.getaddress(); int port = receivepacket.
164 CHAPTER 2 APPLICATION LAYER connection requests, as done in TCPServer.java. If multiple clients access this application, they will all send their packets into this single door, serversocket. String
Tanenbaum, Computer Networks (extraits) Adaptation par J.Bétréma. DNS The Domain Name System
Tanenbaum, Computer Networks (extraits) Adaptation par J.Bétréma DNS The Domain Name System RFC 1034 Network Working Group P. Mockapetris Request for Comments: 1034 ISI Obsoletes: RFCs 882, 883, 973 November
!"# $ %!&' # &! ())*!$
!"# $ %!&' # &! ())*!$ !" #!$ %& ' ( ) * +,--!&"" $.!! /+010!" +!, 31! 4)&/0! $ #"5!! & + 6+ " 5 0 7 /&8-9%& ( +" 5)& /*#.! &( $ 1(" 5 # ( 8 +1 + # + 7$ (+!98 +&%& ( +!" (!+!/ (!-. 5 7 (! 7 1+1( & + ":!
JAVA Program For Processing SMS Messages
JAVA Program For Processing SMS Messages Krishna Akkulu The paper describes the Java program implemented for the MultiModem GPRS wireless modem. The MultiModem offers standards-based quad-band GSM/GPRS
Java Management Extensions SNMP Manager API
Java Management Extensions SNMP Manager API Sun Microsystems, Inc. 901 San Antonio Road Palo Alto, CA 94303 U.S.A. 650-960-1300 August 1999, Draft 2.0 Copyright 1999 Sun Microsystems, Inc., 901 San Antonio
RLC/MAC Uplink Transfer
FORMATION GPRS - TD SIB RLC/MAC Uplink Transfer Access procedure: one phase access CHANNEL REQUEST One Phase Access IMMEDIATE ASSIGNMENT Request Reference / PDCH description / TBF parameters IMMEDIATE_ASSIGNMENT
A Tutorial on Socket Programming in Java
A Tutorial on Socket Programming in Java Natarajan Meghanathan Assistant Professor of Computer Science Jackson State University Jackson, MS 39217, USA Phone: 1-601-979-3661; Fax: 1-601-979-2478 E-mail:
Annexe - OAuth 2.0. 1 Introduction. Xavier de Rochefort [email protected] - labri.fr/~xderoche 15 mai 2014
1 Introduction Annexe - OAuth 2.0. Xavier de Rochefort [email protected] - labri.fr/~xderoche 15 mai 2014 Alternativement à Flickr, notre serveur pourrait proposer aux utilisateurs l utilisation de leur
An Android-based Instant Message Application
An Android-based Instant Message Application Qi Lai, Mao Zheng and Tom Gendreau Department of Computer Science University of Wisconsin - La Crosse La Crosse, WI 54601 [email protected] Abstract One of the
TP : Configuration de routeurs CISCO
TP : Configuration de routeurs CISCO Sovanna Tan Novembre 2010 révision décembre 2012 1/19 Sovanna Tan TP : Routeurs CISCO Plan 1 Présentation du routeur Cisco 1841 2 Le système d exploitation /19 Sovanna
Chapter 11. User Datagram Protocol (UDP)
Chapter 11 User Datagram Protocol (UDP) The McGraw-Hill Companies, Inc., 2000 1 CONTENTS PROCESS-TO-PROCESS COMMUNICATION USER DATAGRAM CHECKSUM UDP OPERATION USE OF UDP UDP PACKAGE The McGraw-Hill Companies,
Java SSL - sslecho SSL socket communication with client certificate
1 of 5 Java SSL socket sample - Kobu.Com 12/25/2012 1:18 PM Sitemap Japanese Java SSL - sslecho SSL socket communication with client certificate Download: sslecho.zip Introduction SSL socket (JSSE) is
Interfaces de programmation pour les composants de la solution LiveCycle ES (juillet 2008)
Interfaces de programmation pour les composants de la solution LiveCycle ES (juillet 2008) Ce document répertorie les interfaces de programmation que les développeurs peuvent utiliser pour créer des applications
Memory Eye SSTIC 2011. Yoann Guillot. Sogeti / ESEC R&D yoann.guillot(at)sogeti.com
Memory Eye SSTIC 2011 Yoann Guillot Sogeti / ESEC R&D yoann.guillot(at)sogeti.com Y. Guillot Memory Eye 2/33 Plan 1 2 3 4 Y. Guillot Memory Eye 3/33 Memory Eye Analyse globale d un programme Un outil pour
Introduction ToIP/Asterisk Quelques applications Trixbox/FOP Autres distributions Conclusion. Asterisk et la ToIP. Projet tuteuré
Asterisk et la ToIP Projet tuteuré Luis Alonso Domínguez López, Romain Gegout, Quentin Hourlier, Benoit Henryon IUT Charlemagne, Licence ASRALL 2008-2009 31 mars 2009 Asterisk et la ToIP 31 mars 2009 1
Start Here. Installation and Documentation Reference. Sun StorEdgeTM 6120 Array
Start Here Installation and Documentation Reference Sun StorEdgeTM 6120 Array 1 Access the Online Documentation These documents and other related documents are available online at http://www.sun.com/documentation
8. Java Network Programming
Chapter 8. Java Networking Programming 173 8. Java Network Programming Outline Overview of TCP/IP Protocol Uniform Resource Locator (URL) Network Clients and servers Networking Support Classes InetAddress
Sun Enterprise Optional Power Sequencer Installation Guide
Sun Enterprise Optional Power Sequencer Installation Guide For the Sun Enterprise 6500/5500 System Cabinet and the Sun Enterprise 68-inch Expansion Cabinet Sun Microsystems, Inc. 901 San Antonio Road Palo
Netflow Gamme de Produits Netflow, ntop, nprobe, Nbar NetFlow Analyzer Solarwinds Cisco NetFlow Orion Netflow Traffic Analyzer Intégration avec Orion NPM 2 K à 12 K Live Demo: http://npmv7.solarwinds.net/login.asp
Corso di Reti di Calcolatori. java.net.inetaddress
Corso di Reti di Calcolatori UNICAL Facoltà di Ingegneria a.a. 2002/2003 Esercitazione sul networking in Java (1 a parte) [email protected] 1 java.net.inetaddress static InetAddress getbyname(string
Bluetooth Low Energy
Bluetooth Low Energy Responsable de l épreuve : L. Toutain Tous documents autorisés. Répondez uniquement sur la copie en annexe. Lisez bien tout le document avant de commencer à répondre 1 Bluetooth Low
How To Write A Program In Java (Programming) On A Microsoft Macbook Or Ipad (For Pc) Or Ipa (For Mac) (For Microsoft) (Programmer) (Or Mac) Or Macbook (For
Projet Java Responsables: Ocan Sankur, Guillaume Scerri (LSV, ENS Cachan) Objectives - Apprendre à programmer en Java - Travailler à plusieurs sur un gros projet qui a plusieurs aspects: graphisme, interface
ATP Co C pyr y ight 2013 B l B ue C o C at S y S s y tems I nc. All R i R ghts R e R serve v d. 1
ATP 1 LES QUESTIONS QUI DEMANDENT RÉPONSE Qui s est introduit dans notre réseau? Comment s y est-on pris? Quelles données ont été compromises? Est-ce terminé? Cela peut-il se reproduire? 2 ADVANCED THREAT
Introduction Les failles les plus courantes Les injections SQL. Failles Web. Maxime Arthaud. net7. Jeudi 03 avril 2014.
Maxime Arthaud net7 Jeudi 03 avril 2014 Syllabus Introduction Exemple de Requête Transmission de données 1 Introduction Exemple de Requête Transmission de données 2 3 Exemple de Requête Transmission de
Enterprise Informa/on Modeling: An Integrated Way to Track and Measure Asset Performance
Enterprise Informa/on Modeling: An Integrated Way to Track and Measure Asset Performance This session will provide a0endees with insight on how to track and measure the performance of their assets from
AgroMarketDay. Research Application Summary pp: 371-375. Abstract
Fourth RUFORUM Biennial Regional Conference 21-25 July 2014, Maputo, Mozambique 371 Research Application Summary pp: 371-375 AgroMarketDay Katusiime, L. 1 & Omiat, I. 1 1 Kampala, Uganda Corresponding
! "# $%&'( ) * ).) "%&' 1* ( %&' ! "%&'2 (! ""$ 1! ""3($
! "# $%&'( ) * +,'-( ).) /"0'" 1 %&' 1* ( %&' "%&'! "%&'2 (! ""$ 1! ""3($ 2 ', '%&' 2 , 3, 4( 4 %&'( 2(! ""$ -5%&'* -2%&'(* ) * %&' 2! ""$ -*! " 4 , - %&' 3( #5! " 5, '56! "* * 4(%&'(! ""$ 3(#! " 42/7'89.:&!
CS255 Programming Project 2
CS255 Programming Project 2 Programming Project 2 Due: Wednesday March 14 th (11:59pm) Can use extension days Can work in pairs One solution per pair Test and submit on Leland machines Overview Implement
Solaris Bandwidth Manager
Solaris Bandwidth Manager By Evert Hoogendoorn - Enterprise Engineering Sun BluePrints Online - June 1999 http://www.sun.com/blueprints Sun Microsystems, Inc. 901 San Antonio Road Palo Alto, CA 94303 USA
Qu est-ce que le Cloud? Quels sont ses points forts? Pourquoi l'adopter? Hugues De Pra Data Center Lead Cisco Belgium & Luxemburg
Qu est-ce que le Cloud? Quels sont ses points forts? Pourquoi l'adopter? Hugues De Pra Data Center Lead Cisco Belgium & Luxemburg Agenda Le Business Case pour le Cloud Computing Qu est ce que le Cloud
Introduction au BIM. ESEB 38170 Seyssinet-Pariset Economie de la construction email : [email protected]
Quel est l objectif? 1 La France n est pas le seul pays impliqué 2 Une démarche obligatoire 3 Une organisation plus efficace 4 Le contexte 5 Risque d erreur INTERVENANTS : - Architecte - Économiste - Contrôleur
CASifier une application
JOSY «Authentification Centralisée» Paris, 6 mai 2010 CASifier une application Julien Marchal Consortium ESUP-Portail CASifier une application Introduction Moyens Module Apache CAS (mod_auth_cas) Librairie
BILL C-665 PROJET DE LOI C-665 C-665 C-665 HOUSE OF COMMONS OF CANADA CHAMBRE DES COMMUNES DU CANADA
C-665 C-665 Second Session, Forty-first Parliament, Deuxième session, quarante et unième législature, HOUSE OF COMMONS OF CANADA CHAMBRE DES COMMUNES DU CANADA BILL C-665 PROJET DE LOI C-665 An Act to
Les fragments. Programmation Mobile Android Master CCI. Une application avec deux fragments. Premier layout : le formulaire
Programmation Mobile Android Master CCI Bertrand Estellon Aix-Marseille Université March 23, 2015 Bertrand Estellon (AMU) Android Master CCI March 23, 2015 1 / 266 Les fragments Un fragment : représente
Installation troubleshooting guide
Installation troubleshooting guide Content ERROR CODE PROBLEMS... 3 Error code 301: Unknown protection system. Verify the installation.... 3 Error code 302: The software cannot be used. The computer date
