Class Server
- java.lang.Object
-
- tk.doraneko.tcp.sendfile.largefile.Server
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
Server.ServerThread
-
Field Summary
Fields Modifier and Type Field Description private int
port
private ServerSocket
serverSocket
private Server.ServerThread
serverThread
private Thread
thread
private String
workingDir
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addThread(Socket socket)
static void
main(String[] args)
Mặc định nơi lưu file là workingDir + "/res/files/"private void
open()
void
run()
private void
start()
-
-
-
Field Detail
-
serverSocket
private ServerSocket serverSocket
-
thread
private Thread thread
-
serverThread
private Server.ServerThread serverThread
-
port
private int port
-
workingDir
private String workingDir
-
-
Constructor Detail
-
Server
public Server(int port, String workingDir) throws IOException
- Throws:
IOException
-
-
Method Detail
-
open
private void open() throws IOException
- Throws:
IOException
-
start
private void start()
-
addThread
private void addThread(Socket socket) throws IOException
- Throws:
IOException
-
main
public static void main(String[] args) throws IOException
Mặc định nơi lưu file là workingDir + "/res/files/"- Parameters:
args
-- Throws:
IOException
-
-