Searched defs:packet (Results 1 - 6 of 6) sorted by relevance

/libcore/luni/src/test/java/libcore/java/net/
H A DOldAndroidDatagramTest.java48 DatagramPacket packet; field in class:OldAndroidDatagramTest.Reflector
58 packet.setLength(buffer.length);
59 socket.receive(packet);
60 String s = stringFromPacket(packet);
61 // System.out.println(s + " (from " + packet.getAddress() + ":" + packet.getPort() + ")");
69 stringToPacket(s.toUpperCase(), packet);
71 packet.setAddress(InetAddress.getLocalHost());
72 packet.setPort(2345);
74 socket.send(packet);
102 stringFromPacket(DatagramPacket packet) argument
109 stringToPacket(String s, DatagramPacket packet) argument
[all...]
/libcore/luni/src/main/java/java/net/
H A DMulticastSocket.java241 * Sends the given {@code packet} on this socket, using the given {@code ttl}. This method is
248 public void send(DatagramPacket packet, byte ttl) throws IOException { argument
250 InetAddress packAddr = packet.getAddress();
255 impl.send(packet);
260 impl.send(packet);
H A DPlainDatagramSocketImpl.java155 DatagramPacket packet = new DatagramPacket(EmptyArray.BYTE, 0);
156 int result = peekData(packet);
158 sender.ipaddress = packet.getAddress().getAddress();
181 public void send(DatagramPacket packet) throws IOException { argument
182 int port = isNativeConnected ? 0 : packet.getPort();
183 InetAddress address = isNativeConnected ? null : packet.getAddress();
184 IoBridge.sendto(fd, packet.getData(), packet.getOffset(), packet.getLength(), 0, address,
245 * Set the received address and port in the packet
253 updatePacketRecvAddress(DatagramPacket packet) argument
[all...]
/libcore/luni/src/main/java/java/nio/
H A DDatagramChannelImpl.java227 // receive real data packet, (not peek)
263 // copy the data of received packet
573 public void receive(DatagramPacket packet) throws IOException { argument
579 super.receive(packet);
588 public void send(DatagramPacket packet) throws IOException { argument
596 super.send(packet);
/libcore/luni/src/main/java/libcore/io/
H A DIoBridge.java545 public static int recvfrom(boolean isRead, FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, DatagramPacket packet, boolean isConnected) throws IOException { argument
548 InetSocketAddress srcAddress = (packet != null && !isConnected) ? new InetSocketAddress() : null;
550 result = postRecvfrom(isRead, packet, isConnected, srcAddress, result);
557 public static int recvfrom(boolean isRead, FileDescriptor fd, ByteBuffer buffer, int flags, DatagramPacket packet, boolean isConnected) throws IOException { argument
560 InetSocketAddress srcAddress = (packet != null && !isConnected) ? new InetSocketAddress() : null;
562 result = postRecvfrom(isRead, packet, isConnected, srcAddress, result);
569 private static int postRecvfrom(boolean isRead, DatagramPacket packet, boolean isConnected, InetSocketAddress srcAddress, int byteCount) { argument
573 if (packet != null) {
574 packet.setReceivedLength(byteCount);
576 packet
[all...]
/libcore/luni/src/test/java/libcore/io/
H A DOsTest.java379 private static void checkSocketPing(FileDescriptor fd, InetAddress to, byte[] packet, argument
381 int len = packet.length;
382 packet[0] = type;
384 assertEquals(len, Libcore.os.sendto(fd, packet, 0, len, 0, to, 0));
387 assertEquals(len, Libcore.os.sendto(fd, packet, 0, len, 0, null, 0));
403 assertArrayEquals(packet, received);
409 final byte[] packet = ("\000\000\000\000" + // ICMP type, code.
415 checkSocketPing(fd, ipv6Loopback, packet, ICMPV6_ECHO_REQUEST, ICMPV6_ECHO_REPLY, true);
416 checkSocketPing(fd, ipv6Loopback, packet, ICMPV6_ECHO_REQUEST, ICMPV6_ECHO_REPLY, false);
420 checkSocketPing(fd, ipv4Loopback, packet, ICMP_ECH
[all...]

Completed in 89 milliseconds