public DataOutputX writeShortBytes(byte[] b) throws IOException { this.writeShort(b.length); this.write(b); return this; }
public DataOutputX writeIntBytes(byte[] b) throws IOException { this.writeInt(b.length); this.write(b); return this; }
public void write(DataOutputX out) throws IOException { if (value == null) value = empty; out.write(value); }
static private boolean SendMTU(InetAddress IPAddress, int port, long pkid, int total, int num, int packetSize, byte[] data) throws IOException { Configure conf = Configure.getInstance(); DataOutputX out = new DataOutputX(); out.write(NetCafe.CAFE_MTU); out.writeInt(conf.getObjHash()); out.writeLong(pkid); out.writeShort(total); out.writeShort(num); out.writeBlob(data); return sendUdp(IPAddress, port, out.toByteArray()); } }
public DataOutputX writeShortBytes(byte[] b) throws IOException { this.writeShort(b.length); this.write(b); return this; }
public DataOutputX writeIntBytes(byte[] b) throws IOException { this.writeInt(b.length); this.write(b); return this; }
static public void sendUdpPackToServer(Pack pack){ Configure conf = Configure.getInstance(); try { UdpAgent.sendUdp(conf.net_collector_ip, conf.net_collector_udp_port, new DataOutputX().write(NetCafe.CAFE).writePack(pack).toByteArray()); } catch (Exception e) { e.printStackTrace(); } }
public void write(DataOutputX out) throws IOException { if (value == null) value = empty; out.write(value); }
public DataOutputX writeShortBytes(byte[] b) throws IOException { this.writeShort(b.length); this.write(b); return this; }
public DataOutputX writeIntBytes(byte[] b) throws IOException { this.writeInt(b.length); this.write(b); return this; }
public void write(DataOutputX out) throws IOException { if (value == null) value = empty; out.write(value); }
public DataOutputX writeShortBytes(byte[] b) throws IOException { this.writeShort(b.length); this.write(b); return this; }
public DataOutputX writeIntBytes(byte[] b) throws IOException { this.writeInt(b.length); this.write(b); return this; }
public void write(DataOutputX out) throws IOException { if (value == null) value = empty; out.write(value); }
public DataOutputX writeIntBytes(byte[] b) throws IOException { this.writeInt(b.length); this.write(b); return this; }
public void write(DataOutputX out) throws IOException { if (value == null) value = empty; out.write(value); }
private void sendList(int bufferCount, byte[] buffer) throws IOException { DataOutputX outter = new DataOutputX(); outter.write(NetCafe.CAFE_N); outter.writeShort(bufferCount); outter.write(buffer); byte[] buff = outter.toByteArray(); DatagramPacket packet = new DatagramPacket(buff, buff.length); packet.setAddress(server_host); packet.setPort(server_port); datagram.send(packet); } public boolean debugWrite(String ip, int port, int length) {
private void sendList(int bufferCount, byte[] buffer) throws IOException { DataOutputX outter = new DataOutputX(); outter.write(NetCafe.CAFE_N); outter.writeShort(bufferCount); outter.write(buffer); byte[] buff = outter.toByteArray(); DatagramPacket packet = new DatagramPacket(buff, buff.length); packet.setAddress(server_host); packet.setPort(server_port); datagram.send(packet); } public boolean debugWrite(String ip, int port, int length) {