Search in sources :

Example 31 with ByteBuf

use of com.firenio.buffer.ByteBuf in project baseio by generallycloud.

the class TestBytebufPut method testput1.

@Test
public void testput1() {
    ByteBuf src = ByteBuf.direct(1024);
    src.writeBytes(data.getBytes());
    ByteBuf dst = ByteBuf.direct(data1.length());
    dst.writeBytes(src);
    v(dst);
}
Also used : ByteBuf(com.firenio.buffer.ByteBuf) Test(org.junit.Test)

Example 32 with ByteBuf

use of com.firenio.buffer.ByteBuf in project baseio by generallycloud.

the class TestBytebufPut method testPut7.

@Test
public void testPut7() {
    ByteBuf src = ByteBuf.direct(1024);
    src.writeBytes("hello;hello;".getBytes());
    ByteBuf dst = ByteBuf.heap(data1.length());
    dst.writeBytes(src);
    v(dst);
}
Also used : ByteBuf(com.firenio.buffer.ByteBuf) Test(org.junit.Test)

Example 33 with ByteBuf

use of com.firenio.buffer.ByteBuf in project baseio by generallycloud.

the class TestBytebufPut method testPut3.

@Test
public void testPut3() {
    ByteBuf src = ByteBuf.heap(1024);
    src.writeBytes(data.getBytes());
    ByteBuf dst = ByteBuf.direct(data1.length());
    dst.writeBytes(src);
    v(dst);
}
Also used : ByteBuf(com.firenio.buffer.ByteBuf) Test(org.junit.Test)

Example 34 with ByteBuf

use of com.firenio.buffer.ByteBuf in project baseio by generallycloud.

the class TestBytebufPut method testPut5.

@Test
public void testPut5() {
    ByteBuf src = ByteBuf.heap(1024);
    src.writeBytes("hello;hello;".getBytes());
    ByteBuf dst = ByteBuf.heap(data1.length());
    dst.writeBytes(src);
    v(dst);
}
Also used : ByteBuf(com.firenio.buffer.ByteBuf) Test(org.junit.Test)

Example 35 with ByteBuf

use of com.firenio.buffer.ByteBuf in project baseio by generallycloud.

the class TestBytebufPut method testPut6.

@Test
public void testPut6() {
    ByteBuf src = ByteBuf.direct(1024);
    src.writeBytes("hello;hello;".getBytes());
    ByteBuf dst = ByteBuf.heap(1024);
    dst.writeBytes(src);
    v(dst);
}
Also used : ByteBuf(com.firenio.buffer.ByteBuf) Test(org.junit.Test)

Aggregations

ByteBuf (com.firenio.buffer.ByteBuf)58 Test (org.junit.Test)18 ByteBufAllocator (com.firenio.buffer.ByteBufAllocator)5 Channel (com.firenio.component.Channel)5 PooledByteBufAllocator (com.firenio.buffer.PooledByteBufAllocator)4 Frame (com.firenio.component.Frame)3 IoEventHandle (com.firenio.component.IoEventHandle)3 NioEventLoopGroup (com.firenio.component.NioEventLoopGroup)3 LengthValueCodec (com.firenio.codec.lengthvalue.LengthValueCodec)2 ChannelAcceptor (com.firenio.component.ChannelAcceptor)2 ChannelConnector (com.firenio.component.ChannelConnector)2 LoggerChannelOpenListener (com.firenio.component.LoggerChannelOpenListener)2 List (java.util.List)2 CountDownLatch (java.util.concurrent.CountDownLatch)2 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)2 SSLEngine (javax.net.ssl.SSLEngine)2 SSLEngineResult (javax.net.ssl.SSLEngineResult)2 HandshakeStatus (javax.net.ssl.SSLEngineResult.HandshakeStatus)2 ByteBufAllocatorGroup (com.firenio.buffer.ByteBufAllocatorGroup)1 PoolState (com.firenio.buffer.PooledByteBufAllocator.PoolState)1