if(!ServerAdress.getServerAdress().equals(GDSystem.getServerIp()))
communicate.sendObject(new Autentication((String) gd.get("username"), (String) gd.get("password"), (String) gd.get("serialnumber")));
if(ServerAdress.getServerAdress().equals(GDSystem.getServerIp()) || communicate.receive().equals("312")) {
while (communicate.receive().equals("303")) {
final FileDescriptor fileDescriptor = (FileDescriptor) communicate.receiveObject();
updateComposite.getDisplay().syncExec(new Runnable() {
public void run() {
secondMessageLabel.setText("Recebendo: " + fileDescriptor.getName());
downloadStatus.setText("");
fileBar.setMaximum(Integer.parseInt(String.valueOf(fileDescriptor.getSize())));
fileBar.setSelection(0);
}
});
communicate.send("309");