Non-Blocking Sockets Lectures
This module shows how to use non-blocking TCP and UDP sockets
Source code
The programming examples can be found in GitHub, https://github.com/KTH-ID1212/nio
Videos
-
Indroduction to Java NIO and non-blocking sockets
Links to an external site.
This is the presentation used in the video, nio.pdf Download nio.pdf
- How to use threads with non-blocking sockets
Links to an external site.
-
File handling program using Java NIO
Links to an external site.
The example above illustrates the following.
- Different ways to access a file using Java IO and Java NIO
- Performance of the different file access strategies
- The chat program with non-blocking sockets.
- The chat program example above illustrates the following.
- A layered architecture
- Design and coding best practices
- Thread usage on client and server when using non-blocking sockets
- TCP communication with non-blocking sockets