Class NWUDPSession

All Implemented Interfaces:
NSObjectProtocol, ObjCProtocol

public class NWUDPSession
extends NSObject
Since:
Available in iOS 9.0 and later.
  • Constructor Details

    • NWUDPSession

      public NWUDPSession()
    • NWUDPSession

      protected NWUDPSession​(NSObject.Handle h, long handle)
    • NWUDPSession

      protected NWUDPSession​(NSObject.SkipInit skipInit)
    • NWUDPSession

      public NWUDPSession​(NWUDPSession session)
      Since:
      Available in iOS 9.0 and later.
  • Method Details

    • getState

      public NWUDPSessionState getState()
      Since:
      Available in iOS 9.0 and later.
    • getEndpoint

      public NWEndpoint getEndpoint()
      Since:
      Available in iOS 9.0 and later.
    • getResolvedEndpoint

      public NWEndpoint getResolvedEndpoint()
      Since:
      Available in iOS 9.0 and later.
    • isViable

      public boolean isViable()
      Since:
      Available in iOS 9.0 and later.
    • hasBetterPath

      public boolean hasBetterPath()
      Since:
      Available in iOS 9.0 and later.
    • getCurrentPath

      public NWPath getCurrentPath()
      Since:
      Available in iOS 9.0 and later.
    • getMaximumDatagramLength

      public long getMaximumDatagramLength()
      Since:
      Available in iOS 9.0 and later.
    • init

      protected long init​(NWUDPSession session)
      Since:
      Available in iOS 9.0 and later.
    • tryNextResolvedEndpoint

      public void tryNextResolvedEndpoint()
      Since:
      Available in iOS 9.0 and later.
    • setReadHandler

      public void setReadHandler​(VoidBlock2<NSArray<NSData>,​NSError> handler, long maxDatagrams)
      Since:
      Available in iOS 9.0 and later.
    • writeMultipleDatagrams

      public void writeMultipleDatagrams​(NSArray<NSData> datagramArray, VoidBlock1<NSError> completionHandler)
      Since:
      Available in iOS 9.0 and later.
    • writeDatagram

      public void writeDatagram​(NSData datagram, VoidBlock1<NSError> completionHandler)
      Since:
      Available in iOS 9.0 and later.
    • cancel

      public void cancel()
      Since:
      Available in iOS 9.0 and later.