Skip to content
Snippets Groups Projects
Commit 43fbec0e authored by pr1n19's avatar pr1n19
Browse files

Structure for all requirements laid out

parent 52245e0d
No related branches found
No related tags found
No related merge requests found
import java.net.ServerSocket;
import java.net.Socket;
public class DStore {
private static String fileFolder;
private static int timeout;
public static void main(String[] args) {
//Take arguments from command line
int port = Integer.parseInt(args[0]);
int cPort = Integer.parseInt(args[1]);
timeout = Integer.parseInt(args[2]);
fileFolder = args[3];
//Make connection with controller & listen to send acknowledgments
//Create socket to listen for store, load & remove requests
try{
//Create server socket to listen for
ServerSocket ss = new ServerSocket(port);
//
for(;;){
try{
Socket client = ss.accept();
}catch (Exception e){
System.out.println("error "+e);
}
}
}catch (Exception e){
System.out.println("error "+e);
}
}
private static void storeFile(String fileName) {
}
private static void loadFile(String fileName) {
}
private static void removeFile(String fileName) {
}
private static void sendError() {
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment