1、java Binary codec

byteBuffer.flip()

byteBuffer.getInt() And  byteBuf.getInt(11)

2、 Sticking and unpacking

LengthFieldBasedFrameDecoder(2048,4,4,-8,0)

3、netty Clients interact with other servers

@Override
public void channelReadComplete(ChannelHandlerContext ctx) throws Exception {
ctx.flush();
ctx.close();
}

4、 Chinese byte

Chinese characters take up two bytes , Note that to get the length of the data, the character getBytes() after

5、javaBean And XML String conversion

JAXB Tools

6、Java Generic

Use Netty Send and receive binary message problem remember more related articles

  1. Jmeter software test 3-- Sending binary messages

    Have been use Jmeter test post Interface , But message information is in plaintext , Today we test how to use binary message Jmeter test , Check the source code of the project , The message is not only binary , And it works java.util.zip Compressed , From late ...

  2. java socket Parsing and sending binary message tool ( attach java and C++ Transformation problem )

    analysis : The first is to read bytes : /** * Reads the length of the specified byte in the input stream * <p/> * Input stream * * @param length Specify the length * @return An array of bytes of specified length */ pu ...

  3. solve netty The client receives incomplete messages

    Logic is dealing with handler Add a handler before , then channelReadComplete This event is handled . At the same time, pay attention to the configuration of customer service : public void connect(String addr, i ...

  4. 2014 The first 13 Thursday Webservice The problem of concept

    I came back to the website in the evening to learn two questions that I have been wondering for the past two days : 1.REST and SOAP Under the framework of Webservice The difference between ? 2.axis2 and CXF The difference between . Most of it is theory , For a moment , There will be more practice in the future . One .R ...

  5. Win7 Long term use of high memory problems remember

    Work computer Win7 64 position ,8G Memory , No virtual memory set , Running for several days , It's just sleep in the middle , Today, when I try it, I always prompt that there is not enough memory , Look, task manager has finished several processes that occupy more memory , But the memory footprint is still 80% above ,eclip ...

  6. netty Basics -- Basically

    Use maven Building a basic netty Transceiver application , As the basis for other applications . Client side usage packet sender Tools . 1  add to netty rely on 1  maven netty rely on <dependency ...

  7. be based on Netty and SpringBoot Implement a lightweight RPC frame - Agreement article

    be based on Netty and SpringBoot Implement a lightweight RPC frame - Agreement article Premise Recently, I am more interested in network programming , In the practice of micro service, the relatively mainstream RPC The frame is like Spring Cloud Gateway The bottom layer also switches ...

  8. Netty Tour 3 :Netty Server start source code analysis , Take away in a shuttle !

    Netty Server start process source analysis Preface hello , Since the last chapter <Netty Tour two : Word of mouth high performance Netty What is it ?> after , It took two weeks to open today's Netty Source series . The first article on source code analysis , Next, I'll ...

  9. netty Common code

    One . Server public class TimeServer_argu { public void bind(int port) throws InterruptedException { Ev ...

Random recommendation

  1. df command

    http://www.th7.cn/system/lin/201311/46839.shtml http://www.111cn.net/sys/CentOS/86335.htm

  2. Q_OBJECT

    all QObject In official documents, it is recommended to place macro in header file Q_OBJECT, So what exactly did the macro do for us ? stay qobjectdef.h There is the following code in : #define Q_OBJECT \ publ ...

  3. Unity-Animato In-depth series ---FloatValue damping

    go back to  Animator Go deep into the series catalog Animator Of SetFloat The interface can set damping , also 4 There are only two types of variables float It supports damping . public void SetFloat(int id, flo ...

  4. C# winform Options Provincial and municipal linkage

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...

  5. leetcode344——Reverse String(C++)

    Write a function that takes a string as input and returns the string reversed. Example:Given s = &qu ...

  6. ubuntu ssh-keygen Permission denied

    ubuntu Lower generation github Upper ssh keys, perform : ssh-keygen Direct execution : sudo chown user1:user1 /home/user1/.ssh -R Successfully generated .

  7. Linux Turn off firewall command

    Here is red hat/CentOs7 Command to turn off the firewall ! 1: View fire protection status systemctl status firewalld service  iptables status 2: Turn off the firewall temporarily s ...

  8. 「Python」6 Kind of python In the implementation of shell Command method

    use Python call Shell There are several ways to command : The first one is : os.system("The command you want"). This call is pretty straightforward , And it's synchronous , The program needs to block and wait ...

  9. CF1121C simulation

    Disgusting. Disgusting ,,round Never use library functions .. /* Enumerate the timeline t,r It's the current completion ratio , Record the start time of each test si, If there is t-si be equal to r, Then mark the test The priority queue stores each test , according to si+ai Of ...

  10. About angular2 pack ( One )

    I'm talking about angular2 And before the above items are packaged , Let me start with .angular cli Have your own packaging tools , Familiar can be used directly . If you're not used to it , You can also use webpack And so on. . Built in systemjs It's also easy to use ...