// ------------------------------------------------------------------
// Send the data down the TCP pipe
// ------------------------------------------------------------------
+ debug_handler( "Sending Data At %f Seconds", get_timestamp_millis() );
if( send( sock_obj->sock_fd, data, strlen(data), 0 ) < 0 ) {
fatal_handler( "tcp_send(): Error sending data" );
return 0;
#else // read everything we can
+ debug_handler( "Receiving Data At %f Seconds", get_timestamp_millis() );
while( (n = recv(sock_fd, buf, BUFSIZE-1, 0) ) > 0 ) {
//printf("\nReceived: %s\n", buf);
sock_obj->data_received_callback( sock_obj->user_data, buf );