Application example of Java NIO socket and AS3 socket (sticky packet decoding) connection

Source: Internet
Author: User
Tags rar

Simple application of the Java NIO socket to the AS3 socket connection <ignore_js_op>application instance of the Java NiO socket to the AS3 socket connection. RAR (9.61 KB, download count: 1691)

This from the basic to get up too complex, I got a Mina with flash communication, communication Data mode is datalength+data (data length + data content), for socket byte throttle communication, I used this way, convenient sticky packet decoding processing. The required jar packages are included, and the client code must be self-written and not inherited.
The data structure sent by the flash socket is: Total body length + body data
Principal data
Cmd_send = 1000//Send Chat message (main command number)
Opcode:short = 1000 (Deputy command number)
Channel:short//Channel
Lens:short//Chat class capacity length
Msg:char[lens]//chat content
<ignore_js_op>

Mina_server.rar

1.19 MB, download number: 735, download points: Silver-12

Application example of Java NIO socket and AS3 socket (sticky packet decoding) connection

Related Article

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.