public void Set(AddNotifyIncomingPacketQueueFullOptions other) { if (other != null) { m_ApiVersion = P2PInterface.AddnotifyincomingpacketqueuefullApiLatest; } }
/// <summary> /// Listen for when our packet queue has become full. This event gives an opportunity to read packets to make /// room for new incoming packets. If this event fires and no packets are read by calling <see cref="ReceivePacket" /> /// or the packet queue size is not increased by <see cref="SetPacketQueueSize" />, any packets that are received after /// this event are discarded until there is room again in the queue. /// </summary> /// <param name="options">Information about what version of the <see cref="AddNotifyIncomingPacketQueueFull" /> API is supported</param> /// <param name="clientData">Arbitrary data that is passed back to you in the CompletionDelegate</param> /// <param name="incomingPacketQueueFullHandler">The callback to be fired when the incoming packet queue is full</param> /// <returns> /// A valid notification ID if successfully bound, or <see cref="Common.InvalidNotificationid" /> otherwise /// </returns> public ulong AddNotifyIncomingPacketQueueFull(AddNotifyIncomingPacketQueueFullOptions options, object clientData, OnIncomingPacketQueueFullCallback incomingPacketQueueFullHandler) { System.IntPtr optionsAddress = new System.IntPtr(); Helper.TryMarshalSet <AddNotifyIncomingPacketQueueFullOptionsInternal, AddNotifyIncomingPacketQueueFullOptions>(ref optionsAddress, options); var clientDataAddress = System.IntPtr.Zero; var incomingPacketQueueFullHandlerInternal = new OnIncomingPacketQueueFullCallbackInternal(OnIncomingPacketQueueFullCallbackInternalImplementation); Helper.AddCallback(ref clientDataAddress, clientData, incomingPacketQueueFullHandler, incomingPacketQueueFullHandlerInternal); var funcResult = EOS_P2P_AddNotifyIncomingPacketQueueFull(InnerHandle, optionsAddress, clientDataAddress, incomingPacketQueueFullHandlerInternal); Helper.TryMarshalDispose(ref optionsAddress); Helper.TryAssignNotificationIdToCallback(clientDataAddress, funcResult); return(funcResult); }