How to write a full server client message using java nio

I am new to java NIO. I have to write a simple server client communication program using Java NIO.

Are there any sample programs or links where I can do this?

+7
java sockets nio
source share
5 answers

You can watch Apache Mina . If you only want to learn java NIO, it can be a little difficult for me.

+4
source share

Apache mine
http://mina.apache.org
Apache MINA is a network application infrastructure that helps users develop highly performance and highly scalable network applications.

xSocket
http://xsocket.org/
xSocket is an easy-to-use NIO-based library for creating high-performance, highly scalable network applications.

Jboss netty
http://netty.io/
The Netty project is an attempt to provide an asynchronous network, an event-driven application infrastructure, and tools to quickly develop supported high-performance protocols and highly scalable servers and clients.

Sun MicroSystem Grizzly
https://grizzly.java.net/
The Grizzly framework was designed to help developers use the Java NIO API. Grizzly's goal is to help developers build scalable and reliable servers using NIO.

NIO Framework
http://nioframework.sourceforge.net
The NIO Framework is a library on top of NIO that hides most of the complexity of a simple NIO. With the NIO Framework, you can implement a high-performance network of Java applications without having to deal with all the unpleasant details of NIO.

Quickserver
http://www.quickserver.org
QuickServer is an open source Java library / framework for quickly building robust multi-tenant TCP server applications. QuickServer provides an abstraction of the ServerSocket, Socket classes, and other network and input output classes, and this makes it easy to create powerful network servers.

+25
source share

Look in your JDK in a directory called sample

+1
source share

I believe you should take a look at Apache HttpComponents if your application uses HTTP, of course. There are several examples in the downloadable library archive. Please note that httpcore, httpcore-nio and httpclient are part of the project.

Greetings.

0
source share

You should see online tutorials. Creating highly scalable servers with Java NIO looks especially relevant.

IBM has a tutorial (registration required), while Sun has a simple example of various NIO objects (and not just client / server APIs)

0
source share

All Articles