Class DebugServerClient

java.lang.Object
org.robovm.libimobiledevice.DebugServerClient
All Implemented Interfaces:
java.lang.AutoCloseable

public class DebugServerClient
extends java.lang.Object
implements java.lang.AutoCloseable
Handles connection with debugserver running on device
  • Field Details

  • Constructor Details

  • Method Details

    • getRef

      protected DebugServerClientRef getRef()
    • checkDisposed

      protected final void checkDisposed()
    • dispose

      public void dispose()
    • close

      public void close()
      Specified by:
      close in interface java.lang.AutoCloseable
    • send

      public int send​(byte[] buffer, int offset, int count)
      Sends data to the device using connection behind this DebugServerClient.
      Parameters:
      buffer - the buffer to be sent.
      offset - the start position in buffer from where to get bytes.
      count - the number of bytes from buffer to send.
      Returns:
      the number of bytes actually sent.
    • receive

      public int receive​(byte[] buffer, int offset, int count, int timeout)
      Receives data from the device. Returns after the given timeout even if no data has been received.
      Parameters:
      buffer - the byte array in which to store the received data.
      offset - the initial position in buffer to store the received bytes.
      count - the maximum number of bytes to store in buffer.
      timeout - timeout in milliseconds after which this method will return even if no data has been received.
      Returns:
      the number of bytes received.