All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.frostwire.jlibtorrent.swig.udp_endpoint Maven / Gradle / Ivy

There is a newer version: 1.2.0.18
Show newest version
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 3.0.12
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package com.frostwire.jlibtorrent.swig;

public class udp_endpoint {
  private transient long swigCPtr;
  protected transient boolean swigCMemOwn;

  protected udp_endpoint(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  protected static long getCPtr(udp_endpoint obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        libtorrent_jni.delete_udp_endpoint(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public udp_endpoint() {
    this(libtorrent_jni.new_udp_endpoint__SWIG_0(), true);
  }

  public udp_endpoint(address address, int port) {
    this(libtorrent_jni.new_udp_endpoint__SWIG_1(address.getCPtr(address), address, port), true);
  }

  public udp_endpoint(udp_endpoint other) {
    this(libtorrent_jni.new_udp_endpoint__SWIG_2(udp_endpoint.getCPtr(other), other), true);
  }

  public int port() {
    return libtorrent_jni.udp_endpoint_port(swigCPtr, this);
  }

  public address address() {
    return new address(libtorrent_jni.udp_endpoint_address(swigCPtr, this), true);
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy