Sha256: 33c0a90ed8f536bff6d54ac5de9fdd709cebfb89cfb020b27e534acbc6ac5c1b

Contents?: true

Size: 605 Bytes

Versions: 2

Compression:

Stored size: 605 Bytes

Contents

package com.game_machine.core;

import static io.netty.buffer.Unpooled.wrappedBuffer;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToMessageEncoder;

import java.util.List;

import GameMachine.Messages.ClientMessage;

public class ClientMessageEncoder extends MessageToMessageEncoder<ClientMessage> {
	@Override
    protected void encode(ChannelHandlerContext ctx, ClientMessage msg, List<Object> out) throws Exception {
        if (msg instanceof ClientMessage) {
            out.add(wrappedBuffer(msg.toPrefixedByteArray()));
            return;
        }
    }
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
game_machine-1.0.4 java/project/src/main/java/com/game_machine/core/ClientMessageEncoder.java
game_machine-1.0.2 java/project/src/main/java/com/game_machine/core/ClientMessageEncoder.java