source/Sources/AirPlayReceiverSession.c
static OSStatus	_RetransmitsSendRequest( AirPlayReceiverSessionRef inSession, uint16_t inSeqStart, uint16_t inSeqCount )
{
	OSStatus						err;
	RTCPRetransmitRequestPacket		pkt;
	ssize_t							n;
	size_t							size;
	
	size = kRTCPRetransmitRequestPacketMinSize;
	pkt.v_p			= RTCPHeaderInsertVersion( 0, kRTPVersion );
	pkt.pt			= kRTCPTypeRetransmitRequest;
	pkt.length		= htons( (uint16_t)( ( size / 4 ) - 1 ) );
	pkt.seqStart	= htons( inSeqStart );
	pkt.seqCount	= htons( inSeqCount );

	if( inSession->rtcpConnected )
	{
		n = send( inSession->rtcpSock, (char *) &pkt, size, 0 );
	}
	else
	{
		n = sendto( inSession->rtcpSock, (char *) &pkt, size, 0, &inSession->rtcpRemoteAddr.sa, inSession->rtcpRemoteLen );
	}
	err = map_socket_value_errno( inSession->rtcpSock, n == (ssize_t) size, n );
	require_noerr( err, exit );
	++inSession->source.retransmitSendCount;
	
exit:
	return( err );
}
//===========================================================================================================================
//	_RetransmitsSendRequest
//
//	Warning: Assumes the AirTunes lock is held.
//===========================================================================================================================
_RetransmitsSendRequest
Warning: Assumes the AirTunes lock is held.
_RetransmitsSendRequest Warning : Assumes the AirTunes lock is held .
static OSStatus	_RetransmitsSendRequest( AirPlayReceiverSessionRef inSession, uint16_t inSeqStart, uint16_t inSeqCount )
{
	OSStatus						err;
	RTCPRetransmitRequestPacket		pkt;
	ssize_t							n;
	size_t							size;
	size = kRTCPRetransmitRequestPacketMinSize;
	pkt.v_p			= RTCPHeaderInsertVersion( 0, kRTPVersion );
	pkt.pt			= kRTCPTypeRetransmitRequest;
	pkt.length		= htons( (uint16_t)( ( size / 4 ) - 1 ) );
	pkt.seqStart	= htons( inSeqStart );
	pkt.seqCount	= htons( inSeqCount );
	if( inSession->rtcpConnected )
	{
		n = send( inSession->rtcpSock, (char *) &pkt, size, 0 );
	}
	else
	{
		n = sendto( inSession->rtcpSock, (char *) &pkt, size, 0, &inSession->rtcpRemoteAddr.sa, inSession->rtcpRemoteLen );
	}
	err = map_socket_value_errno( inSession->rtcpSock, n == (ssize_t) size, n );
	require_noerr( err, exit );
	++inSession->source.retransmitSendCount;
exit:
	return( err );
}
static OSStatus _RetransmitsSendRequest ( AirPlayReceiverSessionRef inSession , uint16_t inSeqStart , uint16_t inSeqCount ) { OSStatus err ; RTCPRetransmitRequestPacket pkt ; ssize_t n ; size_t size ; size = kRTCPRetransmitRequestPacketMinSize ; pkt . v_p = RTCPHeaderInsertVersion ( 0 , kRTPVersion ) ; pkt . pt = kRTCPTypeRetransmitRequest ; pkt . length = htons ( ( uint16_t ) ( ( size / 4 ) - 1 ) ) ; pkt . seqStart = htons ( inSeqStart ) ; pkt . seqCount = htons ( inSeqCount ) ; if ( inSession -> rtcpConnected ) { n = send ( inSession -> rtcpSock , ( char * ) & pkt , size , 0 ) ; } else { n = sendto ( inSession -> rtcpSock , ( char * ) & pkt , size , 0 , & inSession -> rtcpRemoteAddr . sa , inSession -> rtcpRemoteLen ) ; } err = map_socket_value_errno ( inSession -> rtcpSock , n == ( ssize_t ) size , n ) ; require_noerr ( err , exit ) ; ++ inSession -> source . retransmitSendCount ; exit : return ( err ) ; }
_RetransmitsSendRequest
Warning: Assumes the AirTunes lock is held.
_RetransmitsSendRequest Warning : Assumes the AirTunes lock is held .