Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 202 of file pipetunnel.cpp.
Referenced by main().
{ for(;;) { DWORD read; char buffer[1024]; // wait for input data WaitForSingleObject(hPipe, INFINITE); if (!ReadFile(hPipe, buffer, sizeof(buffer), &read, NULL)) { DWORD error = GetLastError(); if (error == ERROR_PIPE_LISTENING) Sleep(1000); else return error; } if (read) { #ifdef _DEBUG dbg_trace('>', buffer, read); #endif if (!send(sock, buffer, read, 0)) { perror("send()"); return GetLastError(); } } } }