MCPcopy Create free account
hub / github.com/LMMS/lmms / read

Function read

include/RemotePlugin.h:681–706  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

679 shmFifo * m_out;
680#else
681 void read( void * _buf, int _len )
682 {
683 if( isInvalid() )
684 {
685 memset( _buf, 0, _len );
686 return;
687 }
688 char * buf = (char *) _buf;
689 int remaining = _len;
690 while ( remaining )
691 {
692 ssize_t nread = ::read( m_socket, buf, remaining );
693 switch ( nread )
694 {
695 case -1:
696 fprintf( stderr,
697 "Error while reading.\n" );
698 case 0:
699 invalidate();
700 memset( _buf, 0, _len );
701 return;
702 }
703 buf += nread;
704 remaining -= nread;
705 }
706 }
707
708 void write( const void * _buf, int _len )
709 {

Callers 7

readMethod · 0.85
read_stateMethod · 0.85
getMidiMethod · 0.85
readIntMethod · 0.85
readStringMethod · 0.85
readIntFunction · 0.85
readStringFunction · 0.85

Calls 2

isInvalidFunction · 0.85
invalidateFunction · 0.85

Tested by

no test coverage detected