http://sunil-android.blogspot.fr/2013/02/gets-ip-addresses-of-given-host.html

http://www.allaboutcircuits.com/projects/garage-door-controller-from-the-web/

http://www.allaboutcircuits.com/projects/transmit-temperature-with-raspberry-pi/

http://eagle.phys.utk.edu/guidry/android/webDataStreams.html

http://lakjeewa.blogspot.fr/2014/05/simple-android-client-server-application.html   bien

http://android-er.blogspot.fr/2011/01/simple-communication-using.html

http://android-er.blogspot.fr/2014/02/android-sercerclient-example-client.html  bien

http://android-er.blogspot.fr/2014/02/android-sercerclient-example-server.html

http://android-er.blogspot.fr/2010/10/simple-example-of-alarm-service-using.html


http://techdive.in/java/java-socket-programming-transmission-control-protocol-tcp


http://way2java.com/networking/chat-program-two-way-communication/

http://www.careerbless.com/samplecodes/java/beginners/socket/SocketBasic1.php

http://stackoverflow.com/questions/30834770/java-tcpclient-sending-command-to-tcpserver

https://github.com/akshath/SocketTest

http://www.eng.northampton.ac.uk/~espen/CSY2026/TCPJavaProgramming.htm

http://www.binarytides.com/java-socket-programming-tutorial/

http://www.jmdoudoux.fr/java/dej/chap-net.htm

gpio mode 0 out
gpio write 0 1
gpio read 0

man gpio

<?php
system ( "gpio mode 0 out" );
system ( "gpio write 0 1" );
?>

<?php
exec ( "gpio read 0", $status );
print_r ( $status );
?>

<?php
$status = array ( 0 );
//set pins mode to output
for ($i = 0; $i <= 7; $i ) {
system ( "gpio mode ".$i." out" );
}
//turns on the LEDs
for ($i = 0; $i <= 7; $i ) {
system ( "gpio write ".$i." 1" );
}
//reads and prints the LEDs status
for ($i = 0; $i <= 7; $i ) {
exec ( "gpio read ".$i, $status );
echo ( $status[0] );
}
//waits 2 seconds
sleep ( 2 );
//turns off the LEDs
for ($i = 0; $i <= 7; $i ) {
system ( "gpio write ".$i." 0" );
}
?>


try {  
Runtime.getRuntime().exec("cmd.exe" );  
} catch (Exception e) { }

Runtime.getRuntime().exec("gpio -g write 18 1");

http://apprendre-python.com/page-reseaux-sockets-python-port


http://queinnec.perso.enseeiht.fr/Ens/Chat/socket-java.html

http://www.bogotobogo.com/Java/tutorial/tcp_socket_server_client.php


http://www.rgagnon.com/javadetails/java-0542.html  bien pour le transfert de fichier

To download a file, a simpler and better way is to use the built-in JDK HTTP server, see this HowTo

http://www.rgagnon.com/javadetails/java-have-a-simple-http-server.html


- Find out who is accessing my ServerSocketTag

Socket aSock = myServerSocket.accept();

System.out.println 
  ("Connection from : " 
     + aSock.getInetAddress().getHostAddress() 
     + ':' + aSock.getPort()); 
	 
- pseudo ping 
	 
http://www.rgagnon.com/javadetails/java-0093.html

http://www.java2s.com/Code/Java/Network-Protocol/TransferafileviaSocket.htm

http://codereview.stackexchange.com/questions/29478/transfer-log-file-between-client-and-server-while-updating-files-automatically


http://www.coderpanda.com/java-socket-programming-file-transfer-through-socket-in-java/

http://www.jmdoudoux.fr/java/dej/chap-net.htm


///// client 
DatagramSocket  socket;
try{
         socket             = new DatagramSocket();
         String requestData         = "'Hello World' via UDP in JAVA";
         byte [] m              = requestData.getBytes();
         InetAddress aHost      = InetAddress.getByName("myhostname");
         int serverPort             = 1234;
         DatagramPacket request     = new DatagramPacket(m, requestData.length(), aHost, serverPort);
         socket.send(request);
         byte [] buffer = new byte[1000];
         DatagramPacket reply = new DatagramPacket(buffer, buffer.length);
         socket.setSoTimeout(2000);
         this.socket.receive(reply);
}
catch(SocketTimeoutException e){
    e.printStackTrace();
}
catch(Exception e){
        e.printStackTrace();
}finally{
    socket.close();
}

// serveur

DatagramSocket  socket;
DatagramPacket  request;
 
while(true)
{
      String data = null;
                 
       try {
        buffer          = new byte[this.DGRAM_LENGTH];
        request         = new DatagramPacket(buffer, buffer.length);
        socket.receive(this.request);
        data = new String(this.request.getData());
        String request = data.trim();
                //do your processing with request data
                //Sending response 
                String response = "Test Reply from UDP server!";
                DatagramPacket reply = new DatagramPacket(response.getBytes(), response.length(), request.getAddress(), request.getPort());
        this.socket.send(reply);
    }
    catch(Exception err) {
        err.printStackTrace();
    } 
}



/**
    Java ECHO server with UDP sockets example
    Silver Moon (m00n.silv3r@gmail.com)
*/
 
import java.io.*;
import java.net.*;
 
public class udp_server
{
    public static void main(String args[])
    {
        DatagramSocket sock = null;
         
        try
        {
            //1. creating a server socket, parameter is local port number
            sock = new DatagramSocket(7777);
             
            //buffer to receive incoming data
            byte[] buffer = new byte[65536];
            DatagramPacket incoming = new DatagramPacket(buffer, buffer.length);
             
            //2. Wait for an incoming data
            echo("Server socket created. Waiting for incoming data...");
             
            //communication loop
            while(true)
            {
                sock.receive(incoming);
                byte[] data = incoming.getData();
                String s = new String(data, 0, incoming.getLength());
                 
                //echo the details of incoming data - client ip : client port - client message
                echo(incoming.getAddress().getHostAddress() + " : " + incoming.getPort() + " - " + s);
                 
                s = "OK : " + s;
                DatagramPacket dp = new DatagramPacket(s.getBytes() , s.getBytes().length , incoming.getAddress() , incoming.getPort());
                sock.send(dp);
            }
        }
         
        catch(IOException e)
        {
            System.err.println("IOException " + e);
        }
    }
     
    //simple function to echo data to terminal
    public static void echo(String msg)
    {
        System.out.println(msg);
    }
}


/**
    Java ECHO client with UDP sockets example
    Silver Moon (m00n.silv3r@gmail.com)
*/
 
import java.io.*;
import java.net.*;
 
public class udp_client
{
    public static void main(String args[])
    {
        DatagramSocket sock = null;
        int port = 7777;
        String s;
         
        BufferedReader cin = new BufferedReader(new InputStreamReader(System.in));
         
        try
        {
            sock = new DatagramSocket();
             
            InetAddress host = InetAddress.getByName("localhost");
             
            while(true)
            {
                //take input and send the packet
                echo("Enter message to send : ");
                s = (String)cin.readLine();
                byte[] b = s.getBytes();
                 
                DatagramPacket  dp = new DatagramPacket(b , b.length , host , port);
                sock.send(dp);
                 
                //now receive reply
                //buffer to receive incoming data
                byte[] buffer = new byte[65536];
                DatagramPacket reply = new DatagramPacket(buffer, buffer.length);
                sock.receive(reply);
                 
                byte[] data = reply.getData();
                s = new String(data, 0, reply.getLength());
                 
                //echo the details of incoming data - client ip : client port - client message
                echo(reply.getAddress().getHostAddress() + " : " + reply.getPort() + " - " + s);
            }
        }
         
        catch(IOException e)
        {
            System.err.println("IOException " + e);
        }
    }
     
    //simple function to echo data to terminal
    public static void echo(String msg)
    {
        System.out.println(msg);
    }
}

////////////////////////////////////////////

import java.io.*;
import java.net.*;

class UDPServer
{
   public static void main(String args[]) throws Exception
      {
         DatagramSocket serverSocket = new DatagramSocket(9876);
            byte[] receiveData = new byte[1024];
            byte[] sendData = new byte[1024];
            while(true)
               {
                  DatagramPacket receivePacket = new DatagramPacket(receiveData, receiveData.length);
                  serverSocket.receive(receivePacket);
                  String sentence = new String( receivePacket.getData());
                  System.out.println("RECEIVED: " + sentence);
                  InetAddress IPAddress = receivePacket.getAddress();
                  int port = receivePacket.getPort();
                  String capitalizedSentence = sentence.toUpperCase();
                  sendData = capitalizedSentence.getBytes();
                  DatagramPacket sendPacket =
                  new DatagramPacket(sendData, sendData.length, IPAddress, port);
                  serverSocket.send(sendPacket);
               }
      }
} - See more at: https://systembash.com/a-simple-java-udp-server-and-udp-client/#sthash.RBz9yjYw.dpuf

import java.io.*;
import java.net.*;

class UDPClient
{
   public static void main(String args[]) throws Exception
   {
      BufferedReader inFromUser =
         new BufferedReader(new InputStreamReader(System.in));
      DatagramSocket clientSocket = new DatagramSocket();
      InetAddress IPAddress = InetAddress.getByName("localhost");
      byte[] sendData = new byte[1024];
      byte[] receiveData = new byte[1024];
      String sentence = inFromUser.readLine();
      sendData = sentence.getBytes();
      DatagramPacket sendPacket = new DatagramPacket(sendData, sendData.length, IPAddress, 9876);
      clientSocket.send(sendPacket);
      DatagramPacket receivePacket = new DatagramPacket(receiveData, receiveData.length);
      clientSocket.receive(receivePacket);
      String modifiedSentence = new String(receivePacket.getData());
      System.out.println("FROM SERVER:" + modifiedSentence);
      clientSocket.close();
   }
} - See more at: https://systembash.com/a-simple-java-udp-server-and-udp-client/#sthash.RBz9yjYw.dpuf


http://java-buddy.blogspot.fr/2014/02/simple-example-of-tcp-clientserver.html


http://java-buddy.blogspot.fr/2014/02/simple-example-of-udp-clientserver.html


https://github.com/GharsallaouiNader/Control-robot-java-Raspberry-pi/blob/master/controlRobot

http://android-er.blogspot.fr/2013/12/implement-socket-on-android-to.html  ---------------- mega bien

http://helloraspberrypi.blogspot.fr/2013/12/java-exercise-implement-client-and.html  ------- mega bien

http://electrofriends.com/source-codes/software-programs/java/advanced-programs/java-program-of-client-server-network-for-chatting-between-client-and-server/

http://electrofriends.com/source-codes/software-programs/java/advanced-programs/java-program-that-finds-the-area-of-a-circle-using-client-server-network/

http://electrofriends.com/source-codes/software-programs/java/advanced-programs/datagramsocket-and-datagrampacket-client-server-program-using-udpip/

Programmation réseau avec Java

    Auteur(s) : Elliotte Rusty Harold
    Editeur(s) : O'Reilly

http://codetoearn.blogspot.fr/2013/01/tcp-socket-example-basics.html

http://codetoearn.blogspot.fr/2013/01/multi-thread-tcp-socket-programming.html

http://www.tutorialspoint.com/java/java_networking.htm  classe socket

http://queinnec.perso.enseeiht.fr/Ens/Chat/socket-java.html

http://o7planning.org/web/fe/default/en/document/766735/java-socket-programming-tutorial    -------- pas mal du tout

http://www.go4expert.com/articles/complete-java-networking-explained-t21100/


http://defaut.developpez.com/tutoriel/java/serveur/multithread/

http://pirate.shu.edu/~wachsmut/Teaching/CSAS2214/Virtual/Lectures/chat-client-server.html

http://inetjava.sourceforge.net/lectures/part1_sockets/InetJava-1.9-Chat-Client-Server-Example.html

http://www.dailyfreecode.com/code/socket-multi-client-chat-server-1252.aspx

http://way2java.com/networking/chat-program-two-way-communication/

https://openclassrooms.com/courses/introduction-aux-sockets-1


 


 http://www.learn2crack.com/2014/03/android-executing-shell-commands.html  a voir
 
 http://elinux.org/RPi_GPIO_Code_Samples
 
 
 http://www.pobot.org/Entrees-sorties-GPIO-sur-Raspberry.html   commande wiring PI
 
 http://www.siongboon.com/projects/2013-07-08_raspberry_pi/index.html   pour la programmation du raspberry