Package

Source Code of Sendr

import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.io.IOException;
import java.net.InetAddress;

public class Sendr {

    public static void main(String[] argv) {
 
  byte[] to_send = new byte[1];// message.getBytes() ;
  to_send[0] = 0x02;
 
  try {
      DatagramPacket outPacket =
    new DatagramPacket(to_send, to_send.length,InetAddress.getByName("172.16.10.130"),1234);//exempaprès voir par rapport au drone pour l'ip et le port
      DatagramSocket socket = new DatagramSocket() ;
      socket.send(outPacket) ;
  } catch (IOException e) {
      System.out.println("Oups!!! un problème est survenu, passage en mode stablisation") ;
  }

    }


}
TOP

Related Classes of Sendr

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.