VST Devel: Inserting system call into processReplacing?

[If nobody has any idea what is causing this, please consider the question asked on the last line of this post below]

Hi VST Masters!,

I am developing a VST effect in C++ that is capable of examining the the amplitudes of the sample values from within processReplacing() and then transmit a sampling of the sample values (like 100 floating point values per second) to an external application via a TCP socket. These amplitude values are then used to draw a VU meter on a graphical display. (I cannot display this on a VSTGUI or something like that, it has to be sent to an external application).

//-----------------------------------------------------------------------------------------
void AGain::process (float **inputs, float **outputs, long sampleFrames)
{
    float *in1  =  inputs[0];
    float *in2  =  inputs[1];
    float *out1 = outputs[0];
    float *out2 = outputs[1];
long unsigned int counter = 0;

    while (--sampleFrames >= 0)
    {
  // this code causes the VST to hang! Are we allowed to put stuff like this in the middle of processReplacing loop?

        if(counter % 100000) // only take a sample every 100000 samples
        {
        my_tcp_socket->transmit_amplitude_to_external_application(*in1); 
        counter++; 
         }
        (*out1++) += (*in1++) * fGain;    // accumulating
        (*out2++) += (*in2++) * fGain;
    }
}

Unfortunately, the VST causes the host to freeze up if I make any type of call to the TCP socket code from within any point inside the VST module code. I know the code runs fine from outside of the VST. I have tested it extensively.

Are there any limitations to VSTs that prevent certain types of function calls linked to other external libraries and operating system system calls to be executed from within process() or processReplacing()?

Do interrupts need to be disabled? Are the VSTS sandboxed in some manner? Does the nature of a wrapper prevent access to certain types of function calls?

If I am doing this the wrong way, does anyone know what is the easiest and best way to transmit periodic amplitude values from inside a VST to an external application?

Cheers, Kindest Regards, and Thank You,

-Paulzz