0

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);
}

1 Answer 1

6

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

Sign up to request clarification or add additional context in comments.

1 Comment

+1, for providing the answer without code, which will require @maximal to think a little.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.