Package org.jnode.net

Examples of org.jnode.net.SocketBuffer.toByteArray()


                    SocketBuffer packet = rxRing.currentDesc().getPacket();
                    driver.onReceive(packet);
                    log.debug("New packet");
                    log.debug(packet.getLinkLayerHeader().getSourceAddress());
                    log.debug(packet.getLinkLayerHeader().getDestinationAddress());
                    log.debug('\n' + hexDump(packet.toByteArray()) + '\n');
                    rxRing.currentDesc().setOwnBit();
                    rxRing.next();
                }

            } catch (Exception e) {
View Full Code Here


            n += optionValue.length + 2;
        }
        skbuf.set(n, END_OPTION);

        header.prefixTo(skbuf);
        final byte[] data = skbuf.toByteArray();
        return new DatagramPacket(data, data.length);
    }
}
View Full Code Here

    public DatagramPacket toDatagramPacket() {
        final SocketBuffer skbuf = new SocketBuffer();
        skbuf.insert(OPTIONS_SIZE);

        header.prefixTo(skbuf);
        final byte[] data = skbuf.toByteArray();
        return new DatagramPacket(data, data.length);
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.