src/connect.c
int send_to_twitserver( int sockfd, const char * restrict buf, size_t nbytes ){	
	size_t bytesToSend = nbytes <= TWIT_MAXLEN ? nbytes : TWIT_MAXLEN;
	int status = 0;

	assert( buf != NULL );	
	
	errno = 0;
	if ( writeall( sockfd, buf, bytesToSend ) != ( ssize_t )bytesToSend ){
		error( "failed to send bytes to the twitserver: (%s)\n", strerror( errno ) );
		status = -1;
	}

	return ( status );
}
// Send a twit to the twitserver. Return 0 if ok and -1 otherwise.
Send a twit to the twitserver. Return 0 if ok and -1 otherwise.
Send a twit to the twitserver . Return 0 if ok and - 1 otherwise .
int send_to_twitserver( int sockfd, const char * restrict buf, size_t nbytes ){	
	size_t bytesToSend = nbytes <= TWIT_MAXLEN ? nbytes : TWIT_MAXLEN;
	int status = 0;
	assert( buf != NULL );	
	errno = 0;
	if ( writeall( sockfd, buf, bytesToSend ) != ( ssize_t )bytesToSend ){
		error( "failed to send bytes to the twitserver: (%s)\n", strerror( errno ) );
		status = -1;
	}
	return ( status );
}
int send_to_twitserver ( int sockfd , const char * restrict buf , size_t nbytes ) { size_t bytesToSend = nbytes <= TWIT_MAXLEN ? nbytes : TWIT_MAXLEN ; int status = 0 ; assert ( buf != NULL ) ; errno = 0 ; if ( writeall ( sockfd , buf , bytesToSend ) != ( ssize_t ) bytesToSend ) { error ( " \n " , strerror ( errno ) ) ; status = -1 ; } return ( status ) ; }
Send a twit to the twitserver.
Send a twit to the twitserver .