FreeRDP
|
#include <stdio.h>
#include <winpr/crt.h>
#include <winpr/pipe.h>
#include <winpr/file.h>
#include <winpr/tchar.h>
#include <winpr/winpr.h>
#include <winpr/print.h>
#include <winpr/synch.h>
#include <winpr/wlog.h>
#include <winpr/thread.h>
#include <signal.h>
#include "../pipe.h"
Macros | |
#define | PIPE_BUFFER_SIZE 32 |
#define | TESTNUMPIPESST 16 |
Functions | |
static DWORD WINAPI | named_pipe_client_thread (LPVOID arg) |
static DWORD WINAPI | named_pipe_server_thread (LPVOID arg) |
static DWORD WINAPI | named_pipe_single_thread (LPVOID arg) |
int | TestPipeCreateNamedPipe (int argc, char *argv[]) |
Variables | |
static HANDLE | ReadyEvent |
static LPTSTR | lpszPipeNameMt = _T("\\\\.\\pipe\\winpr_test_pipe_mt") |
static LPTSTR | lpszPipeNameSt = _T("\\\\.\\pipe\\winpr_test_pipe_st") |
static BOOL | testFailed = FALSE |
#define PIPE_BUFFER_SIZE 32 |
#define TESTNUMPIPESST 16 |
|
static |
|
static |
Note: If a client connects before ConnectNamedPipe is called, the function returns zero and GetLastError returns ERROR_PIPE_CONNECTED. This can happen if a client connects in the interval between the call to CreateNamedPipe and the call to ConnectNamedPipe. In this situation, there is a good connection between client and server, even though the function returns zero.
|
static |
Note: If a client connects before ConnectNamedPipe is called, the function returns zero and GetLastError returns ERROR_PIPE_CONNECTED. This can happen if a client connects in the interval between the call to CreateNamedPipe and the call to ConnectNamedPipe. In this situation, there is a good connection between client and server, even though the function returns zero.
After DisconnectNamedPipe on server end ReadFile/WriteFile must fail on client end
After CloseHandle (without calling DisconnectNamedPipe first) on server end ReadFile/WriteFile must fail on client end
After CloseHandle on client end ReadFile/WriteFile must fail on server end
int TestPipeCreateNamedPipe | ( | int | argc, |
char * | argv[] | ||
) |
|
static |
|
static |
|
static |
|
static |