Codota Logo
RawSocket.recvPacket
Code IndexAdd Codota to your IDE (free)

How to use
recvPacket
method
in
libcore.net.RawSocket

Best Java code snippets using libcore.net.RawSocket.recvPacket (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: robovm/robovm

/**
 * Reads a raw packet into the specified buffer, with the
 * specified timeout.  If the destPort is -1, then the IP
 * destination port is not verified, otherwise only packets
 * destined for the specified UDP port are returned.  Returns the
 * length actually read.  No indication of overflow is signaled.
 * The packet data will start at the IP header (EthernetII
 * dest/source/type headers are removed).
 */
public int read(byte[] packet, int offset, int byteCount, int destPort,
  int timeoutMillis) {
  if (packet == null) {
    throw new NullPointerException("packet == null");
  }
  Arrays.checkOffsetAndCount(packet.length, offset, byteCount);
  if (destPort > 65535) {
    throw new IllegalArgumentException("Port out of range: "
      + destPort);
  }
  return recvPacket(fd, packet, offset, byteCount, destPort,
    timeoutMillis);
}
origin: com.gluonhq/robovm-rt

/**
 * Reads a raw packet into the specified buffer, with the
 * specified timeout.  If the destPort is -1, then the IP
 * destination port is not verified, otherwise only packets
 * destined for the specified UDP port are returned.  Returns the
 * length actually read.  No indication of overflow is signaled.
 * The packet data will start at the IP header (EthernetII
 * dest/source/type headers are removed).
 */
public int read(byte[] packet, int offset, int byteCount, int destPort,
  int timeoutMillis) {
  if (packet == null) {
    throw new NullPointerException("packet == null");
  }
  Arrays.checkOffsetAndCount(packet.length, offset, byteCount);
  if (destPort > 65535) {
    throw new IllegalArgumentException("Port out of range: "
      + destPort);
  }
  return recvPacket(fd, packet, offset, byteCount, destPort,
    timeoutMillis);
}
origin: com.bugvm/bugvm-rt

/**
 * Reads a raw packet into the specified buffer, with the
 * specified timeout.  If the destPort is -1, then the IP
 * destination port is not verified, otherwise only packets
 * destined for the specified UDP port are returned.  Returns the
 * length actually read.  No indication of overflow is signaled.
 * The packet data will start at the IP header (EthernetII
 * dest/source/type headers are removed).
 */
public int read(byte[] packet, int offset, int byteCount, int destPort,
  int timeoutMillis) {
  if (packet == null) {
    throw new NullPointerException("packet == null");
  }
  Arrays.checkOffsetAndCount(packet.length, offset, byteCount);
  if (destPort > 65535) {
    throw new IllegalArgumentException("Port out of range: "
      + destPort);
  }
  return recvPacket(fd, packet, offset, byteCount, destPort,
    timeoutMillis);
}
origin: FlexoVM/flexovm

/**
 * Reads a raw packet into the specified buffer, with the
 * specified timeout.  If the destPort is -1, then the IP
 * destination port is not verified, otherwise only packets
 * destined for the specified UDP port are returned.  Returns the
 * length actually read.  No indication of overflow is signaled.
 * The packet data will start at the IP header (EthernetII
 * dest/source/type headers are removed).
 */
public int read(byte[] packet, int offset, int byteCount, int destPort,
  int timeoutMillis) {
  if (packet == null) {
    throw new NullPointerException("packet == null");
  }
  Arrays.checkOffsetAndCount(packet.length, offset, byteCount);
  if (destPort > 65535) {
    throw new IllegalArgumentException("Port out of range: "
      + destPort);
  }
  return recvPacket(fd, packet, offset, byteCount, destPort,
    timeoutMillis);
}
origin: MobiVM/robovm

/**
 * Reads a raw packet into the specified buffer, with the
 * specified timeout.  If the destPort is -1, then the IP
 * destination port is not verified, otherwise only packets
 * destined for the specified UDP port are returned.  Returns the
 * length actually read.  No indication of overflow is signaled.
 * The packet data will start at the IP header (EthernetII
 * dest/source/type headers are removed).
 */
public int read(byte[] packet, int offset, int byteCount, int destPort,
  int timeoutMillis) {
  if (packet == null) {
    throw new NullPointerException("packet == null");
  }
  Arrays.checkOffsetAndCount(packet.length, offset, byteCount);
  if (destPort > 65535) {
    throw new IllegalArgumentException("Port out of range: "
      + destPort);
  }
  return recvPacket(fd, packet, offset, byteCount, destPort,
    timeoutMillis);
}
origin: ibinti/bugvm

/**
 * Reads a raw packet into the specified buffer, with the
 * specified timeout.  If the destPort is -1, then the IP
 * destination port is not verified, otherwise only packets
 * destined for the specified UDP port are returned.  Returns the
 * length actually read.  No indication of overflow is signaled.
 * The packet data will start at the IP header (EthernetII
 * dest/source/type headers are removed).
 */
public int read(byte[] packet, int offset, int byteCount, int destPort,
  int timeoutMillis) {
  if (packet == null) {
    throw new NullPointerException("packet == null");
  }
  Arrays.checkOffsetAndCount(packet.length, offset, byteCount);
  if (destPort > 65535) {
    throw new IllegalArgumentException("Port out of range: "
      + destPort);
  }
  return recvPacket(fd, packet, offset, byteCount, destPort,
    timeoutMillis);
}
origin: com.mobidevelop.robovm/robovm-rt

/**
 * Reads a raw packet into the specified buffer, with the
 * specified timeout.  If the destPort is -1, then the IP
 * destination port is not verified, otherwise only packets
 * destined for the specified UDP port are returned.  Returns the
 * length actually read.  No indication of overflow is signaled.
 * The packet data will start at the IP header (EthernetII
 * dest/source/type headers are removed).
 */
public int read(byte[] packet, int offset, int byteCount, int destPort,
  int timeoutMillis) {
  if (packet == null) {
    throw new NullPointerException("packet == null");
  }
  Arrays.checkOffsetAndCount(packet.length, offset, byteCount);
  if (destPort > 65535) {
    throw new IllegalArgumentException("Port out of range: "
      + destPort);
  }
  return recvPacket(fd, packet, offset, byteCount, destPort,
    timeoutMillis);
}
libcore.netRawSocketrecvPacket

Popular methods of RawSocket

  • close
    Closes the socket. After this method is invoked, subsequent read/write operations will fail.
  • create
  • sendPacket

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getContentResolver (Context)
  • getResourceAsStream (ClassLoader)
  • putExtra (Intent)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • InputStreamReader (java.io)
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now