2012 All Rights Reserved
Hangzhou, China
I. Overview
The Java multi-server communication framework is a socket communication framework developed based on NiO. It enables communication between clients, servers, and servers. It is suitable for large chat servers and large game servers.
This demoProgramA basic command line chat function is implemented to demonstrate the basic ability to send game commands or chat messages through socket.
Ii. Usage
1. Registration
Command Format: Reg username and password
For example:
> Reg lions 123456
2. log on
Command Format: Login username and password
For example:
> Login lions 123456
3. List
Command Format: List
For example:
> List
4. Send
Command Format: send the message of the recipient's username
For example:
> Send user hello
5. Exit
Command Format: Logout
For example:
> Logout
Iii. Installation
1. Download chatdemo.zip
: Http://download.csdn.net/detail/gonxi/4144587
2. decompress the package to the directory.
3. Run the SQL script and create a database. The default database name is "Account", the data table name is "Account", and the username is "Root Password" is "123456 ".
4. Start the server, execute the BAT file, and start the server in the following order: globalserver, recordserver, sessionserver, gatewayserver, and accountserver. it must be in this order. No error is allowed. Otherwise, restart is disabled. The default IP address of the demo program is 127.0.0.1, and the port number is 2000 ~ 2007.
5. Start the client, run client. bat, and run multiple clients. If a prompt line appears, you can enter the command. It takes a while to execute the command for the first time, and then the execution will be faster. This is why Java understands it.
If you have any questions, you can leave a message on your blog or add QQ 191506998.CodeYes, please contact me. The price is negotiable!
Chinalions 1, 2012.3