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

/libcore/luni/src/test/java/libcore/java/net/
H A DOldAndroidDatagramTest.java46 DatagramPacket packet; field in class:OldAndroidDatagramTest.Reflector
56 packet.setLength(buffer.length);
57 socket.receive(packet);
58 String s = stringFromPacket(packet);
59 // System.out.println(s + " (from " + packet.getAddress() + ":" + packet.getPort() + ")");
67 stringToPacket(s.toUpperCase(), packet);
69 packet.setAddress(InetAddress.getLocalHost());
70 packet.setPort(2345);
72 socket.send(packet);
100 stringFromPacket(DatagramPacket packet) argument
107 stringToPacket(String s, DatagramPacket packet) argument
[all...]
/libcore/luni/src/main/java/libcore/net/
H A DRawSocket.java49 String interfaceName, short protocolType, byte[] destMac, byte[] packet,
51 private static native int recvPacket(FileDescriptor fd, byte[] packet, argument
72 * Reads a raw packet into the specified buffer, with the
77 * The packet data will start at the IP header (EthernetII
80 public int read(byte[] packet, int offset, int byteCount, int destPort, argument
82 if (packet == null) {
83 throw new NullPointerException("packet == null");
86 Arrays.checkOffsetAndCount(packet.length, offset, byteCount);
93 return recvPacket(fd, packet, offset, byteCount, destPort,
98 * Writes a raw packet t
48 sendPacket(FileDescriptor fd, String interfaceName, short protocolType, byte[] destMac, byte[] packet, int offset, int byteCount) argument
103 write(byte[] destMac, byte[] packet, int offset, int byteCount) argument
[all...]
/libcore/luni/src/main/java/java/net/
H A DMulticastSocket.java238 * Sends the given {@code packet} on this socket, using the given {@code ttl}. This method is
245 public void send(DatagramPacket packet, byte ttl) throws IOException { argument
247 InetAddress packAddr = packet.getAddress();
252 impl.send(packet);
257 impl.send(packet);
H A DPlainDatagramSocketImpl.java153 DatagramPacket packet = new DatagramPacket(EmptyArray.BYTE, 0);
154 int result = peekData(packet);
156 sender.ipaddress = packet.getAddress().getAddress();
179 public void send(DatagramPacket packet) throws IOException { argument
180 int port = isNativeConnected ? 0 : packet.getPort();
181 InetAddress address = isNativeConnected ? null : packet.getAddress();
182 IoBridge.sendto(fd, packet.getData(), packet.getOffset(), packet.getLength(), 0, address, port);
228 * Set the received address and port in the packet
236 updatePacketRecvAddress(DatagramPacket packet) argument
[all...]
/libcore/luni/src/main/native/
H A Dlibcore_net_RawSocket.cpp93 * Writes the L3 (IP) packet to the raw socket supplied in the
100 jbyteArray packet, jint offset, jint byteCount)
113 ScopedByteArrayRO byteArray(env, packet);
144 * Reads a network packet into the user-supplied buffer. Return the
145 * length of the packet, or a 0 if there was a timeout or an
146 * unacceptable packet was acquired.
151 jbyteArray packet, jint offset, jint byteCount, jint port,
159 ScopedByteArrayRW body(env, packet);
189 // the packet is an IP header, UDP header, and UDP payload
191 return 0; // runt packet
98 RawSocket_sendPacket(JNIEnv* env, jclass, jobject fileDescriptor, jstring interfaceName, jshort protocolType, jbyteArray destMac, jbyteArray packet, jint offset, jint byteCount) argument
150 RawSocket_recvPacket(JNIEnv* env, jclass, jobject fileDescriptor, jbyteArray packet, jint offset, jint byteCount, jint port, jint timeout_millis) argument
[all...]
/libcore/luni/src/main/java/java/nio/
H A DDatagramChannelImpl.java179 // receive real data packet, (not peek)
215 // copy the data of received packet
234 // copy the data of received packet
551 public void receive(DatagramPacket packet) throws IOException { argument
555 super.receive(packet);
562 public void send(DatagramPacket packet) throws IOException { argument
566 super.send(packet);
/libcore/luni/src/main/java/libcore/io/
H A DIoBridge.java509 public static int recvfrom(boolean isRead, FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, DatagramPacket packet, boolean isConnected) throws IOException { argument
512 InetSocketAddress srcAddress = (packet != null && !isConnected) ? new InetSocketAddress() : null;
514 result = postRecvfrom(isRead, packet, isConnected, srcAddress, result);
521 public static int recvfrom(boolean isRead, FileDescriptor fd, ByteBuffer buffer, int flags, DatagramPacket packet, boolean isConnected) throws IOException { argument
524 InetSocketAddress srcAddress = (packet != null && !isConnected) ? new InetSocketAddress() : null;
526 result = postRecvfrom(isRead, packet, isConnected, srcAddress, result);
533 private static int postRecvfrom(boolean isRead, DatagramPacket packet, boolean isConnected, InetSocketAddress srcAddress, int byteCount) { argument
537 if (packet != null) {
538 packet.setReceivedLength(byteCount);
540 packet
[all...]

Completed in 180 milliseconds