| Modifier and Type | Class and Description |
|---|---|
static interface |
NWUDPSession.Block_setReadHandlerMaxDatagrams |
static interface |
NWUDPSession.Block_writeDatagramCompletionHandler |
static interface |
NWUDPSession.Block_writeMultipleDatagramsCompletionHandler |
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret| Modifier | Constructor and Description |
|---|---|
protected |
NWUDPSession(org.moe.natj.general.Pointer peer) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
accessInstanceVariablesDirectly() |
static NWUDPSession |
alloc() |
static NWUDPSession |
allocWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
static boolean |
automaticallyNotifiesObserversForKey(java.lang.String key) |
void |
cancel()
cancel
|
static void |
cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget) |
static void |
cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument) |
static NSArray<java.lang.String> |
classFallbacksForKeyedArchiver() |
static org.moe.natj.objc.Class |
classForKeyedUnarchiver() |
NWPath |
currentPath()
[@property] currentPath
|
static java.lang.String |
debugDescription_static() |
static java.lang.String |
description_static() |
NWEndpoint |
endpoint()
[@property] endpoint
|
boolean |
hasBetterPath()
[@property] hasBetterPath
|
static long |
hash_static() |
NWUDPSession |
init() |
NWUDPSession |
initWithUpgradeForSession(NWUDPSession session)
initWithUpgradeForSession:
|
static NSObject.Function_instanceMethodForSelector_ret |
instanceMethodForSelector(org.moe.natj.objc.SEL aSelector) |
static NSMethodSignature |
instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
instancesRespondToSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
isSubclassOfClass(org.moe.natj.objc.Class aClass) |
boolean |
isViable()
[@property] viable
|
static NSSet<java.lang.String> |
keyPathsForValuesAffectingValueForKey(java.lang.String key) |
long |
maximumDatagramLength()
[@property] maximumDatagramLength
|
static NWUDPSession |
new_objc() |
static boolean |
resolveClassMethod(org.moe.natj.objc.SEL sel) |
NWEndpoint |
resolvedEndpoint()
[@property] resolvedEndpoint
|
static boolean |
resolveInstanceMethod(org.moe.natj.objc.SEL sel) |
void |
setReadHandlerMaxDatagrams(NWUDPSession.Block_setReadHandlerMaxDatagrams handler,
long maxDatagrams)
setReadHandler:maxDatagrams
|
static void |
setVersion_static(long aVersion) |
long |
state()
[@property] state
|
static org.moe.natj.objc.Class |
superclass_static() |
void |
tryNextResolvedEndpoint()
tryNextResolvedEndpoint
|
static long |
version_static() |
void |
writeDatagramCompletionHandler(NSData datagram,
NWUDPSession.Block_writeDatagramCompletionHandler completionHandler)
writeDatagram:completionHandler
|
void |
writeMultipleDatagramsCompletionHandler(NSArray<? extends NSData> datagramArray,
NWUDPSession.Block_writeMultipleDatagramsCompletionHandler completionHandler)
writeMultipleDatagrams:completionHandler
|
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKeypublic static boolean accessInstanceVariablesDirectly()
public static NWUDPSession alloc()
public static NWUDPSession allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument)
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
public static java.lang.String debugDescription_static()
public static java.lang.String description_static()
public static long hash_static()
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
public static NWUDPSession new_objc()
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
public static void setVersion_static(long aVersion)
public static org.moe.natj.objc.Class superclass_static()
public static long version_static()
public void cancel()
Move into the NWUDPSessionStateCancelled state. The connection will be terminated, and all handlers will be cancelled.
public NWPath currentPath()
The current evaluated path for the resolvedEndpoint. Use KVO to watch for changes.
public NWEndpoint endpoint()
The provided endpoint.
public boolean hasBetterPath()
YES if there is another path available that is preferred over the currentPath. To take advantage of this path, create a new UDPSession. Use KVO to watch for changes.
public NWUDPSession init()
public NWUDPSession initWithUpgradeForSession(NWUDPSession session)
This convenience initializer can be used to create a new session based on the original session's endpoint and parameters.
The application should create an NWUDPSession and watch the "hasBetterPath" property. When this property is YES, it should call initWithUpgradeForSession: to create a new session, with the goal to start transferring data on the new better path as soon as possible to reduce power and potentially monetary cost. When the new "upgrade" session becomes ready and when the application wraps up the previous application session on the original session, the application can start using the new "upgrade" session and tear down the original one.
session - The original session from which the application will upgradepublic boolean isViable()
YES if the connection can read and write data, NO otherwise. Use KVO to watch this property.
public long maximumDatagramLength()
The maximum size of a datagram to be written currently. If a datagram is written with a longer length, the datagram may be fragmented or encounter an error. Note that this value is not guaranteed to be the maximum datagram length for end-to-end communication across the network. Use KVO to watch for changes.
public NWEndpoint resolvedEndpoint()
The currently targeted remote endpoint. Use KVO to watch for changes.
public void setReadHandlerMaxDatagrams(NWUDPSession.Block_setReadHandlerMaxDatagrams handler, long maxDatagrams)
Set a read handler for datagrams. Reads will be scheduled by the system, so this method only needs to be called once for a session.
handler - A handler called when datagrams have been read, or when an error has occurred.maxDatagrams - The maximum number of datagrams to send to the handler.public long state()
The current state of the UDP session. If the state is NWUDPSessionStateReady, then the connection is eligible for reading and writing. The state will be NWUDPSessionStateFailed if the endpoint could not be resolved, or all endpoints have been rejected. Use KVO to watch for changes.
public void tryNextResolvedEndpoint()
Mark the current value of resolvedEndpoint as unusable, and try to switch to the next available endpoint. This should be used when the caller has attempted to communicate with the current resolvedEndpoint, and the caller has determined that it is unusable. If there are no other resolved endpoints, the session will move to the failed state.
public void writeDatagramCompletionHandler(NSData datagram, NWUDPSession.Block_writeDatagramCompletionHandler completionHandler)
Write a single datagram. Callers should wait until the completionHandler is executed before issuing another write.
datagram - An NSData containing the datagram to write.completionHandler - A handler called when the write request has either succeeded or failed.public void writeMultipleDatagramsCompletionHandler(NSArray<? extends NSData> datagramArray, NWUDPSession.Block_writeMultipleDatagramsCompletionHandler completionHandler)
Write multiple datagrams. Callers should wait until the completionHandler is executed before issuing another write.
datagramArray - An NSArray of NSData objects, containing the ordered list datagrams to write.completionHandler - A handler called when the write request has either succeeded or failed.