/// <summary> /// Extends BeginReceiveFromGroup so that buffer offset of 0 and call to Array.Length are not needed. /// <example> /// udpanysourcemulticastclient.BeginReceiveFromGroup(buffer, callback); /// </example> /// </summary> public static IAsyncResult BeginReceiveFromGroup(this UdpAnySourceMulticastClient udpanysourcemulticastclient, Byte[] buffer, AsyncCallback callback) { if(udpanysourcemulticastclient == null) throw new ArgumentNullException("udpanysourcemulticastclient"); if(buffer == null) throw new ArgumentNullException("buffer"); return udpanysourcemulticastclient.BeginReceiveFromGroup(buffer, 0, buffer.Length, callback); }
/// <summary> /// Extends BeginReceiveFromGroup so that when a state object is not needed, null does not need to be passed. /// <example> /// udpanysourcemulticastclient.BeginReceiveFromGroup(buffer, offset, count, callback); /// </example> /// </summary> public static IAsyncResult BeginReceiveFromGroup(this UdpAnySourceMulticastClient udpanysourcemulticastclient, Byte[] buffer, Int32 offset, Int32 count, AsyncCallback callback) { if(udpanysourcemulticastclient == null) throw new ArgumentNullException("udpanysourcemulticastclient"); return udpanysourcemulticastclient.BeginReceiveFromGroup(buffer, offset, count, callback, null); }