[One of Apache mina2.0 Development] builds the Apache Mina framework and implements simple message transmission between the server and client!

Source: Internet
Author: User

All articles on this site areLi huaming himiOriginal, reprinted must be explicitly noted:
Reprinted from[Heimi gamedev block]Link: http://www.himigame.com/apache-mina/831.html

☞Click to subscribe☜
The latest developments in this blog! Notify you of the latest blog in time!

The learning phase of the hibernate series is now over, so now we are going to start the development and learning of Apache Mina. Many children's shoes are wondering why himi suddenly broke away from Game Development in meager and QQ, in fact, more children's shoes may have seen that himi is developed on the server side, and Hibernate and MySQL are all used to pave the way for Mina development on the server side, the current Apache Mina is the real purpose of himi. Haha. Himi's technical goal is "one person can make an online game ~", OK. Let's talk about other things. Let's start the himi Apache Mina development journey.

For children's shoes that are not very connected to Apache Mina, go to the following Baidu encyclopedia to learn more:

Http://baike.baidu.com/view/2668084.htm

First, create a new project (server). Here, himi uses ide as eclipse;

OK. First, configure the environment: slf4j is used for Mina log output. slf4j is familiar with hibernate development and does not need to be introduced. Add the core jar package of Mina;

1. mina-core.jar 2. slf4j-api.jar 3. slf4j-simple.jar

Then we first create two classes:

Himiobject. Java

1234567891011121314151617181920212223242526

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.