@ -12,6 +12,7 @@ class TCPServer {
String capitalizedSentence;
// Server-Socket erzeugen
@SuppressWarnings("resource")
ServerSocket welcomeSocket = new ServerSocket(tcpPort);
while (true) {
@ -2,12 +2,12 @@
package verteiltesysteme.socket.simple;
import java.io.*;
import java.net.*;
class UDPServer {
public static void main(String args[]) throws Exception {
int udpPort = 36037;
DatagramSocket serverSocket = new DatagramSocket(udpPort);
byte[] receiveData = new byte[1024];
byte[] sendData = new byte[1024];