Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
owpk committed Aug 9, 2020
1 parent 6c9207f commit 927f0f3
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 15 deletions.
4 changes: 2 additions & 2 deletions client.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#root_directory
#Sun Aug 09 16:00:07 YAKT 2020
#Sun Aug 09 19:23:22 YAKT 2020
default_server=localhost
port=8190
download_directory=./client/downloads/
port=8190
connect_on_startup=false
root_directory=C\:\\Users\\vzvz4\\Desktop\\PAPKA\\cloudStorageProject\\engine\\CloudStorage\\.\\client\\downloads
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

import io.netty.handler.codec.serialization.ObjectDecoderInputStream;
import io.netty.handler.codec.serialization.ObjectEncoderOutputStream;
import javafx.application.Platform;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.owpk.app.Callback;
import org.owpk.controller.Callback;
import org.owpk.app.ClientConfig;
import org.owpk.network.NetworkServiceInt;

Expand All @@ -28,7 +27,6 @@ public class IONetworkServiceImpl implements NetworkServiceInt {
private Socket socket;
private ObjectDecoderInputStream in;
private ObjectEncoderOutputStream out;
private boolean run;
private InputDataHandler inputDataHandler;
private AuthHandler authHandler;

Expand Down Expand Up @@ -62,7 +60,6 @@ public void connect() throws IOException, InterruptedException, ClassNotFoundExc
log.info("connected : " + socket.getRemoteSocketAddress());
out = new ObjectEncoderOutputStream(socket.getOutputStream());
in = new ObjectDecoderInputStream(socket.getInputStream());
run = true;
authHandler.showDialog(); //sync
authHandler.tryToAuth(); //sync
new Thread(inputDataHandler).start();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
package org.owpk.IODataHandler;

import io.netty.handler.codec.serialization.ObjectDecoderInputStream;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.owpk.app.Callback;
import org.owpk.controller.Callback;
import org.owpk.app.ClientConfig;
import org.owpk.message.DataInfo;
import org.owpk.message.Message;
import org.owpk.network.NetworkServiceInt;
import org.owpk.util.FileInfo;
import org.owpk.util.FileUtility;

import javax.security.sasl.AuthenticationException;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.owpk.app;
package org.owpk.controller;

public interface Callback<T> {
void call(T s);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import lombok.SneakyThrows;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.owpk.app.Callback;
import org.owpk.util.FileInfo;
import org.owpk.util.FileUtility;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
import javafx.scene.input.Dragboard;
import javafx.scene.input.TransferMode;
import org.owpk.IODataHandler.AuthException;
import org.owpk.IODataHandler.AuthHandler;
import org.owpk.app.Callback;
import org.owpk.app.ClientConfig;
import org.owpk.message.DataInfo;
import org.owpk.message.MessageType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import javafx.scene.control.TreeView;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import org.owpk.app.Callback;
import org.owpk.util.FileInfo;

import java.io.File;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.owpk.network;

import org.owpk.IODataHandler.AuthException;
import org.owpk.app.Callback;
import org.owpk.controller.Callback;

import java.io.IOException;
import java.io.InputStream;
Expand Down
1 change: 1 addition & 0 deletions server/src/main/java/org/owpk/core/AuthHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public class AuthHandler extends SimpleChannelInboundHandler<Message<?>> {
private String hash(String input) {
return DigestUtils.sha256Hex(input);
}

@Override
public void channelActive(ChannelHandlerContext ctx) throws Exception {
userDAO = new UserDAO();
Expand Down

0 comments on commit 927f0f3

Please sign in to comment.