maximal
maximal

Reputation: 9

Java socket from tcp to udp

how do I get this code (tcp) to udp in java? Thanks.

ServerSocket servsock2 = new ServerSocket(13367);
Socket sock = servsock2.accept();
System.out.println("Client connected.");
OutputStream os = sock2.getOutputStream();
while(true){
    os.write(int_value);
}

Upvotes: 0

Views: 5071

Answers (1)

NPE
NPE

Reputation: 500893

The following Java tutorial should get you started: All About Datagrams.

Upvotes: 6

Related Questions