/// <summary> /// Attempt to transmit a multiple frames on <paramref name="socket" />. /// If frames cannot be sent immediately, return <c>false</c>. /// </summary> /// <param name="socket">the IOutgoingSocket to transmit on</param> /// <param name="frames">frames to transmit</param> public static bool TrySendMultipartBytes([NotNull] this IOutgoingSocket socket, IEnumerable <byte[]> frames) { return(socket.TrySendMultipartBytes(TimeSpan.Zero, frames)); }
/// <summary> /// Attempt to transmit a multiple frames on <paramref name="socket" />. /// If frames cannot be sent within <paramref name="timeout" />, return <c>false</c>. /// </summary> /// <param name="socket">the IOutgoingSocket to transmit on</param> /// <param name="timeout">The maximum period of time to try to send a message.</param> /// <param name="frames">frames to transmit</param> public static bool TrySendMultipartBytes([NotNull] this IOutgoingSocket socket, TimeSpan timeout, params byte[][] frames) { return(socket.TrySendMultipartBytes(timeout, (IEnumerable <byte[]>)frames)); }