mirror of
https://github.com/binlaab/nanofiles.git
synced 2026-07-01 15:07:21 +02:00
uwu
This commit is contained in:
@@ -1,29 +1,29 @@
|
||||
package es.um.redes.nanoFiles.tcp.server;
|
||||
|
||||
import java.net.Socket;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class NFServerState {
|
||||
private int numberOfConnections;
|
||||
private ArrayList<Socket> sockets;
|
||||
|
||||
public NFServerState() {
|
||||
numberOfConnections = 0;
|
||||
sockets = new ArrayList<>();
|
||||
}
|
||||
|
||||
public int getNumberOfConnections() {
|
||||
return numberOfConnections;
|
||||
}
|
||||
|
||||
public List<Socket> getSockets() {
|
||||
// tu puta madre va a hacer copias
|
||||
return sockets;
|
||||
}
|
||||
|
||||
public void updateState(Socket socket) {
|
||||
sockets.add(socket);
|
||||
numberOfConnections++;
|
||||
}
|
||||
}
|
||||
package es.um.redes.nanoFiles.tcp.server;
|
||||
|
||||
import java.net.Socket;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class NFServerState {
|
||||
private int numberOfConnections;
|
||||
private ArrayList<Socket> sockets;
|
||||
|
||||
public NFServerState() {
|
||||
numberOfConnections = 0;
|
||||
sockets = new ArrayList<>();
|
||||
}
|
||||
|
||||
public int getNumberOfConnections() {
|
||||
return numberOfConnections;
|
||||
}
|
||||
|
||||
public List<Socket> getSockets() {
|
||||
// tu puta madre va a hacer copias
|
||||
return sockets;
|
||||
}
|
||||
|
||||
public void updateState(Socket socket) {
|
||||
sockets.add(socket);
|
||||
numberOfConnections++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user