List of usage examples for io.netty.buffer ByteBuf writeInt
public abstract ByteBuf writeInt(int value);
From source file:com.ltln.modules.openflow.core.protocol.ver14.OFTableModPropEvictionFlagSerializerVer14.java
public static void writeTo(ByteBuf bb, Set<OFTableModPropEvictionFlag> set) { bb.writeInt(toWireValue(set)); }
From source file:com.ltln.modules.openflow.core.types.U32.java
License:Apache License
@Override public void writeTo(ByteBuf bb) { bb.writeInt(raw); }
From source file:com.minemaarten.signals.network.PacketSpawnParticle.java
License:LGPL
@Override public void toBytes(ByteBuf buffer) { super.toBytes(buffer); buffer.writeInt(particleId); buffer.writeDouble(dx);//w w w .ja va 2s . c om buffer.writeDouble(dy); buffer.writeDouble(dz); }
From source file:com.minestellar.core.network.message.MessageAntennaOnline.java
License:Open Source License
@Override public void toBytes(ByteBuf buf) { buf.writeBoolean(isOnline); buf.writeInt(x); buf.writeInt(y); buf.writeInt(z); }
From source file:com.mpush.api.protocol.Packet.java
License:Apache License
public static void encodePacket(Packet packet, ByteBuf out) { if (packet.cmd == Command.HEARTBEAT.cmd) { out.writeByte(Packet.HB_PACKET_BYTE); } else {/*from www . j ava2 s. c o m*/ out.writeInt(packet.getBodyLength()); out.writeByte(packet.cmd); out.writeShort(packet.cc); out.writeByte(packet.flags); out.writeInt(packet.sessionId); out.writeByte(packet.lrc); if (packet.getBodyLength() > 0) { out.writeBytes(packet.body); } } packet.body = null; }
From source file:com.mpush.common.message.ByteBufMessage.java
License:Apache License
public void encodeInt(ByteBuf body, int field) { body.writeInt(field); }
From source file:com.mrcrayfish.furniture.network.message.MessageConfig.java
License:Open Source License
@Override public void toBytes(ByteBuf buf) { List<String> dataList = Recipes.recipeData; buf.writeInt(dataList.size()); for (String data : dataList) { ByteBufUtils.writeUTF8String(buf, data); }//from ww w .jav a 2s. c om }
From source file:com.mrcrayfish.furniture.network.message.MessageDishwasher.java
License:Open Source License
@Override public void toBytes(ByteBuf buf) { buf.writeInt(type); buf.writeInt(x); buf.writeInt(y); buf.writeInt(z); }
From source file:com.mrcrayfish.furniture.network.message.MessageFillBasin.java
License:Open Source License
@Override public void toBytes(ByteBuf buf) { buf.writeBoolean(hasWater); buf.writeInt(x); buf.writeInt(y); buf.writeInt(z); }
From source file:com.mrcrayfish.furniture.network.message.MessageFillBath.java
License:Open Source License
@Override public void toBytes(ByteBuf buf) { buf.writeInt(waterLevel); buf.writeInt(bathOneX);/*from w w w . ja va 2s.com*/ buf.writeInt(bathOneY); buf.writeInt(bathOneZ); buf.writeInt(bathTwoX); buf.writeInt(bathTwoY); buf.writeInt(bathTwoZ); }