DatagramSocket allows a server to accept UDP packets, whereas
ServerSocket allows an application to accept TCP connections.
UDP packets don't guarantee delivery, you'll need to handle missing packets in your client/server.
TCP guarantees delivery, so all you need to do is have your applications read and write using a socket's InputStream and OutputStream.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.