Package br.com.visualmidia.core.server

Examples of br.com.visualmidia.core.server.Communicate


        try {
          if(!GDSystem.isStandAloneMode()) {
            SSLSocketFactory sslComunicationSocketFactory = (SSLSocketFactory) SSLSocketFactory.getDefault();
            SSLSocket sslComunicationSocket = (SSLSocket) sslComunicationSocketFactory.createSocket(GDSystem.getServerIp(), 9998);
           
            Communicate communicate = new Communicate(sslComunicationSocket);
           
            communicate.receiveAndSend("200, Thank you bastard");
            if (communicate.receive().equals("201")) {
              communicate.send("209, Troca de imagens");
              if (communicate.receive().equals("700")) {
                communicate.send("701, me manda a imagem");
                communicate.send(personId);
                if (communicate.receive().equals("704")) {// imagem encontrada
                  communicate.send("706, me mande a imagem");
                  communicate.receivePersonPhoto();
                  getDisplay().syncExec(new Runnable() {
                    public void run() {
                      Image image = new Image(getDisplay(), Constants.TEMP_DIR + "personPhoto" + ".jpg");
                      loadImage(image);
                    }
View Full Code Here


              File file = new File(Constants.TEMP_DIR + personId + ".jpg");
              if(!GDSystem.isStandAloneMode()) {
                SSLSocketFactory sslComunicationSocketFactory = (SSLSocketFactory) SSLSocketFactory.getDefault();
                SSLSocket sslComunicationSocket = (SSLSocket) sslComunicationSocketFactory.createSocket(GDSystem.getServerIp(), 9998);

                Communicate communicate = new Communicate(sslComunicationSocket);
                communicate.receiveAndSend("200, Thank you bastard");
                communicate.receiveAndSend("209, troca de imagens");
                communicate.send("702, vou te enviar uma imagem");
                communicate.send(personId);
                communicate.sendFile(communicate.getFileTransferConectionConnectMode(GDSystem.getServerIp()), file);
              } else {
                copyFileToPhotoFolder(file, personId);
              }
            }
          } catch (Exception exception) {
View Full Code Here

TOP

Related Classes of br.com.visualmidia.core.server.Communicate

Copyright © 2018 www.massapicom. 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.