Reputation:
I'm trying to create a very basic asynchronous server in Java (similar to http://msdn.microsoft.com/en-us/library/fx6588te.aspx in C#). All of the libraries I've seen for Java are way too complex for what I need and I'm wondering if there are any libraries that are simple and have a syntax similar to the C# example.
Edit: Why does plain sockets require root access to listen on the loopback, but nio doesn't require root?
Upvotes: 0
Views: 2343
Reputation: 45433
try AsynchronousServerSocketChannel & AsynchronousSocketChannel
Upvotes: 2
Reputation: 359816
This sounds like a job for Java's NIO (New I/O) ServerSocketChannel
.
Be forewarned, though: this doesn't guarantee better performance. See:
Upvotes: 1