mirror of
https://github.com/PowerShell/Win32-OpenSSH.git
synced 2025-07-23 14:04:59 +02:00
3-2 C4
This commit is contained in:
parent
f378d9bc38
commit
1a66801a45
@ -1,546 +0,0 @@
|
|||||||
|
|
||||||
#undef UNICODE
|
|
||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
|
||||||
|
|
||||||
#include <windows.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
extern "C" {
|
|
||||||
#include "..\win32posix\w32posix.h"
|
|
||||||
}
|
|
||||||
// Need to link with Ws2_32.lib
|
|
||||||
#pragma comment (lib, "Ws2_32.lib")
|
|
||||||
// #pragma comment (lib, "Mswsock.lib")
|
|
||||||
|
|
||||||
#define DEFAULT_BUFLEN 512
|
|
||||||
#define DEFAULT_PORT "27015"
|
|
||||||
|
|
||||||
int regular()
|
|
||||||
{
|
|
||||||
int iResult;
|
|
||||||
|
|
||||||
int ListenSocket;
|
|
||||||
int ClientSocket;
|
|
||||||
|
|
||||||
struct addrinfo *result = NULL;
|
|
||||||
struct addrinfo hints;
|
|
||||||
|
|
||||||
int iSendResult;
|
|
||||||
char recvbuf[DEFAULT_BUFLEN];
|
|
||||||
int recvbuflen = DEFAULT_BUFLEN;
|
|
||||||
|
|
||||||
w32posix_initialize();
|
|
||||||
|
|
||||||
ZeroMemory(&hints, sizeof(hints));
|
|
||||||
//hints.ai_family = AF_INET;
|
|
||||||
hints.ai_socktype = SOCK_STREAM;
|
|
||||||
//hints.ai_protocol = IPPROTO_TCP;
|
|
||||||
hints.ai_flags = AI_PASSIVE;
|
|
||||||
|
|
||||||
// Resolve the server address and port
|
|
||||||
iResult = getaddrinfo("127.0.0.1", DEFAULT_PORT, &hints, &result);
|
|
||||||
if (iResult != 0) {
|
|
||||||
printf("getaddrinfo failed with error: %d\n", iResult);
|
|
||||||
w32posix_done();
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create a SOCKET for connecting to server
|
|
||||||
ListenSocket = socket(result->ai_family, result->ai_socktype, result->ai_protocol);
|
|
||||||
if (ListenSocket == -1) {
|
|
||||||
printf("socket failed with error: %ld\n", errno);
|
|
||||||
freeaddrinfo(result);
|
|
||||||
w32posix_done();
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Setup the TCP listening socket
|
|
||||||
iResult = bind(ListenSocket, result->ai_addr, (int)result->ai_addrlen);
|
|
||||||
if (iResult == -1) {
|
|
||||||
printf("bind failed with error: %d\n", errno);
|
|
||||||
freeaddrinfo(result);
|
|
||||||
close(ListenSocket);
|
|
||||||
w32posix_done();
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
freeaddrinfo(result);
|
|
||||||
|
|
||||||
iResult = listen(ListenSocket, SOMAXCONN);
|
|
||||||
if (iResult == -1) {
|
|
||||||
printf("listen failed with error: %d\n", errno);
|
|
||||||
close(ListenSocket);
|
|
||||||
w32posix_done();
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Accept a client socket
|
|
||||||
ClientSocket = accept(ListenSocket, NULL, NULL);
|
|
||||||
if (ClientSocket == -1) {
|
|
||||||
printf("accept failed with error: %d\n", errno);
|
|
||||||
close(ListenSocket);
|
|
||||||
w32posix_done();
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// No longer need server socket
|
|
||||||
close(ListenSocket);
|
|
||||||
|
|
||||||
// Receive until the peer shuts down the connection
|
|
||||||
do {
|
|
||||||
|
|
||||||
iResult = recv(ClientSocket, recvbuf, recvbuflen, 0);
|
|
||||||
if (iResult > 0) {
|
|
||||||
printf("Bytes received: %d\n", iResult);
|
|
||||||
recvbuf[iResult] = '\0';
|
|
||||||
printf("%s\n", recvbuf);
|
|
||||||
|
|
||||||
// Echo the buffer back to the sender
|
|
||||||
iSendResult = send(ClientSocket, recvbuf, iResult, 0);
|
|
||||||
if (iSendResult == -1) {
|
|
||||||
printf("send failed with error: %d\n", errno);
|
|
||||||
close(ClientSocket);
|
|
||||||
w32posix_done();
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
printf("Bytes sent: %d\n", iSendResult);
|
|
||||||
}
|
|
||||||
else if (iResult == 0)
|
|
||||||
printf("Connection closing...\n");
|
|
||||||
else {
|
|
||||||
printf("recv failed with error: %d\n", errno);
|
|
||||||
close(ClientSocket);
|
|
||||||
w32posix_done();
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} while (iResult > 0);
|
|
||||||
|
|
||||||
// shutdown the connection since we're done
|
|
||||||
iResult = shutdown(ClientSocket, SD_SEND);
|
|
||||||
if (iResult == -1) {
|
|
||||||
printf("shutdown failed with error: %d\n", errno);
|
|
||||||
iSendResult = send(ClientSocket, recvbuf, iResult, 0);
|
|
||||||
if (iSendResult == -1)
|
|
||||||
printf("send failed with error: %d\n", errno);
|
|
||||||
close(ClientSocket);
|
|
||||||
w32posix_done();
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// cleanup
|
|
||||||
close(ClientSocket);
|
|
||||||
w32posix_done();
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int async()
|
|
||||||
{
|
|
||||||
int iResult;
|
|
||||||
|
|
||||||
int ListenSocket;
|
|
||||||
int ClientSocket;
|
|
||||||
|
|
||||||
struct addrinfo *result = NULL;
|
|
||||||
struct addrinfo hints;
|
|
||||||
|
|
||||||
int iSendResult;
|
|
||||||
char recvbuf[DEFAULT_BUFLEN];
|
|
||||||
int recvbuflen = DEFAULT_BUFLEN;
|
|
||||||
|
|
||||||
w32posix_initialize();
|
|
||||||
|
|
||||||
ZeroMemory(&hints, sizeof(hints));
|
|
||||||
hints.ai_family = AF_INET;
|
|
||||||
hints.ai_socktype = SOCK_STREAM;
|
|
||||||
hints.ai_protocol = IPPROTO_TCP;
|
|
||||||
hints.ai_flags = AI_PASSIVE;
|
|
||||||
|
|
||||||
// Resolve the server address and port
|
|
||||||
iResult = getaddrinfo(NULL, DEFAULT_PORT, &hints, &result);
|
|
||||||
if (iResult != 0) {
|
|
||||||
printf("getaddrinfo failed with error: %d\n", iResult);
|
|
||||||
w32posix_done();
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create a SOCKET for connecting to server
|
|
||||||
ListenSocket = socket(result->ai_family, result->ai_socktype, result->ai_protocol);
|
|
||||||
if (ListenSocket == -1) {
|
|
||||||
printf("socket failed with error: %ld\n", errno);
|
|
||||||
freeaddrinfo(result);
|
|
||||||
w32posix_done();
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Setup the TCP listening socket
|
|
||||||
iResult = bind(ListenSocket, result->ai_addr, (int)result->ai_addrlen);
|
|
||||||
if (iResult == -1) {
|
|
||||||
printf("bind failed with error: %d\n", errno);
|
|
||||||
freeaddrinfo(result);
|
|
||||||
close(ListenSocket);
|
|
||||||
w32posix_done();
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
freeaddrinfo(result);
|
|
||||||
|
|
||||||
iResult = listen(ListenSocket, SOMAXCONN);
|
|
||||||
if (iResult == -1) {
|
|
||||||
printf("listen failed with error: %d\n", errno);
|
|
||||||
close(ListenSocket);
|
|
||||||
w32posix_done();
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
fd_set readset;
|
|
||||||
memset(&readset, 0, sizeof(fd_set));
|
|
||||||
FD_SET(ListenSocket, &readset);
|
|
||||||
|
|
||||||
timeval time;
|
|
||||||
time.tv_sec = 60 * 60;
|
|
||||||
if (-1 == select(ListenSocket, &readset, NULL, NULL, &time))
|
|
||||||
{
|
|
||||||
printf("select call failed");
|
|
||||||
close(ListenSocket);
|
|
||||||
w32posix_done();
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!FD_ISSET(ListenSocket, &readset))
|
|
||||||
printf("expected that fd is set");
|
|
||||||
|
|
||||||
// Accept a client socket
|
|
||||||
ClientSocket = accept(ListenSocket, NULL, NULL);
|
|
||||||
if (ClientSocket == -1) {
|
|
||||||
printf("accept failed with error: %d\n", errno);
|
|
||||||
close(ListenSocket);
|
|
||||||
w32posix_done();
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// No longer need server socket
|
|
||||||
close(ListenSocket);
|
|
||||||
|
|
||||||
int fd_flags = fcntl(ClientSocket, F_GETFL);
|
|
||||||
fcntl(ClientSocket, F_SETFL, fd_flags | O_NONBLOCK);
|
|
||||||
|
|
||||||
|
|
||||||
// Receive until the peer shuts down the connection
|
|
||||||
do {
|
|
||||||
|
|
||||||
memset(&readset, 0, sizeof(fd_set));
|
|
||||||
FD_SET(ClientSocket, &readset);
|
|
||||||
if (-1 == select(ClientSocket, &readset, NULL, NULL, &time))
|
|
||||||
{
|
|
||||||
printf("select call failed");
|
|
||||||
close(ListenSocket);
|
|
||||||
w32posix_done();
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
iResult = recv(ClientSocket, recvbuf, recvbuflen, 0);
|
|
||||||
if (iResult > 0) {
|
|
||||||
printf("Bytes received: %d\n", iResult);
|
|
||||||
recvbuf[iResult] = '\0';
|
|
||||||
printf("%s\n", recvbuf);
|
|
||||||
|
|
||||||
// Echo the buffer back to the sender
|
|
||||||
iSendResult = send(ClientSocket, recvbuf, iResult, 0);
|
|
||||||
if (iSendResult == -1) {
|
|
||||||
printf("send failed with error: %d\n", errno);
|
|
||||||
close(ClientSocket);
|
|
||||||
w32posix_done();
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
printf("Bytes sent: %d\n", iSendResult);
|
|
||||||
}
|
|
||||||
else if (iResult == 0)
|
|
||||||
printf("Connection closing...\n");
|
|
||||||
else {
|
|
||||||
printf("recv failed with error: %d\n", errno);
|
|
||||||
close(ClientSocket);
|
|
||||||
w32posix_done();
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} while (iResult > 0);
|
|
||||||
|
|
||||||
// shutdown the connection since we're done
|
|
||||||
iResult = shutdown(ClientSocket, SD_SEND);
|
|
||||||
if (iResult == -1) {
|
|
||||||
printf("shutdown failed with error: %d\n", errno);
|
|
||||||
close(ClientSocket);
|
|
||||||
w32posix_done();
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// cleanup
|
|
||||||
close(ClientSocket);
|
|
||||||
w32posix_done();
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#undef DEFAULT_BUFLEN
|
|
||||||
#define DEFAULT_BUFLEN 1024*1024
|
|
||||||
BOOL writemode;
|
|
||||||
int throughput()
|
|
||||||
{
|
|
||||||
int iResult;
|
|
||||||
|
|
||||||
int ListenSocket;
|
|
||||||
int ClientSocket;
|
|
||||||
|
|
||||||
struct addrinfo *result = NULL;
|
|
||||||
struct addrinfo hints;
|
|
||||||
|
|
||||||
char *recvbuf = (char*)malloc(DEFAULT_BUFLEN);
|
|
||||||
int recvbuflen = DEFAULT_BUFLEN;
|
|
||||||
|
|
||||||
w32posix_initialize();
|
|
||||||
|
|
||||||
ZeroMemory(&hints, sizeof(hints));
|
|
||||||
hints.ai_family = AF_INET;
|
|
||||||
hints.ai_socktype = SOCK_STREAM;
|
|
||||||
hints.ai_protocol = IPPROTO_TCP;
|
|
||||||
hints.ai_flags = AI_PASSIVE;
|
|
||||||
|
|
||||||
// Resolve the server address and port
|
|
||||||
iResult = getaddrinfo(NULL, DEFAULT_PORT, &hints, &result);
|
|
||||||
if (iResult != 0) {
|
|
||||||
printf("getaddrinfo failed with error: %d\n", iResult);
|
|
||||||
w32posix_done();
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create a SOCKET for connecting to server
|
|
||||||
ListenSocket = socket(result->ai_family, result->ai_socktype, result->ai_protocol);
|
|
||||||
if (ListenSocket == -1) {
|
|
||||||
printf("socket failed with error: %ld\n", errno);
|
|
||||||
freeaddrinfo(result);
|
|
||||||
w32posix_done();
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Setup the TCP listening socket
|
|
||||||
iResult = bind(ListenSocket, result->ai_addr, (int)result->ai_addrlen);
|
|
||||||
if (iResult == -1) {
|
|
||||||
printf("bind failed with error: %d\n", errno);
|
|
||||||
freeaddrinfo(result);
|
|
||||||
close(ListenSocket);
|
|
||||||
w32posix_done();
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
freeaddrinfo(result);
|
|
||||||
|
|
||||||
iResult = listen(ListenSocket, SOMAXCONN);
|
|
||||||
if (iResult == -1) {
|
|
||||||
printf("listen failed with error: %d\n", errno);
|
|
||||||
close(ListenSocket);
|
|
||||||
w32posix_done();
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Accept a client socket
|
|
||||||
ClientSocket = accept(ListenSocket, NULL, NULL);
|
|
||||||
if (ClientSocket == -1) {
|
|
||||||
printf("accept failed with error: %d\n", errno);
|
|
||||||
close(ListenSocket);
|
|
||||||
w32posix_done();
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// No longer need server socket
|
|
||||||
close(ListenSocket);
|
|
||||||
|
|
||||||
double totalbytes = 0;
|
|
||||||
|
|
||||||
// Receive until the peer shuts down the connection
|
|
||||||
if (writemode)
|
|
||||||
{
|
|
||||||
char *sendbuf = (char*)malloc(DEFAULT_BUFLEN);
|
|
||||||
int sendbuflen = DEFAULT_BUFLEN;
|
|
||||||
|
|
||||||
while (totalbytes < 50000 * 1024 * 1024)
|
|
||||||
{
|
|
||||||
iResult = send(ClientSocket, sendbuf, sendbuflen, 0);
|
|
||||||
if (iResult == SOCKET_ERROR) {
|
|
||||||
printf("send failed with error: %d\n", WSAGetLastError());
|
|
||||||
close(ClientSocket);
|
|
||||||
w32posix_done();
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
totalbytes += iResult;
|
|
||||||
}
|
|
||||||
|
|
||||||
printf("send %f bytes\n", totalbytes);
|
|
||||||
// shutdown the connection since no more data will be sent
|
|
||||||
iResult = shutdown(ClientSocket, SD_SEND);
|
|
||||||
if (iResult == SOCKET_ERROR) {
|
|
||||||
printf("shutdown failed with error: %d\n", WSAGetLastError());
|
|
||||||
close(ClientSocket);
|
|
||||||
w32posix_done();
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
do {
|
|
||||||
|
|
||||||
iResult = recv(ClientSocket, recvbuf, recvbuflen, 0);
|
|
||||||
if (iResult > 0) {
|
|
||||||
totalbytes += iResult;
|
|
||||||
}
|
|
||||||
else if (iResult == 0)
|
|
||||||
printf("Connection closing...\n");
|
|
||||||
else {
|
|
||||||
printf("recv failed with error: %d\n", errno);
|
|
||||||
close(ClientSocket);
|
|
||||||
w32posix_done();
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} while (iResult > 0);
|
|
||||||
|
|
||||||
printf("Received total bytes %f\n", totalbytes);
|
|
||||||
}
|
|
||||||
|
|
||||||
// cleanup
|
|
||||||
close(ClientSocket);
|
|
||||||
w32posix_done();
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
DWORD WINAPI ThreadProcedure(void* param)
|
|
||||||
{
|
|
||||||
Sleep(20*1000);
|
|
||||||
int writefd = *((int*)param);
|
|
||||||
close(writefd);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int pipetest()
|
|
||||||
{
|
|
||||||
int pipefds[2];
|
|
||||||
|
|
||||||
w32posix_initialize();
|
|
||||||
if (-1 == pipe(pipefds))
|
|
||||||
{
|
|
||||||
printf("creating pipe failed %d\n", errno);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int readfd = pipefds[0];
|
|
||||||
int writefd = pipefds[1];
|
|
||||||
char* buf = "test characters to write";
|
|
||||||
char readbuf[512];
|
|
||||||
|
|
||||||
CreateThread(0, 0, &ThreadProcedure, &readfd, 0, NULL);
|
|
||||||
int count = 0;
|
|
||||||
while (1) {
|
|
||||||
int written = write(writefd, buf, strlen(buf));
|
|
||||||
printf("Iteration %d Written %d\n", count++, written);
|
|
||||||
if (written == -1) {
|
|
||||||
printf("write to pipe failed %d \n", errno);
|
|
||||||
close(readfd);
|
|
||||||
close(writefd);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
int rd = read(readfd, readbuf, 512);
|
|
||||||
if (rd == -1) {
|
|
||||||
printf("reading from pipe failed %d \n", errno);
|
|
||||||
close(readfd);
|
|
||||||
close(writefd);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
close(writefd);
|
|
||||||
|
|
||||||
close(readfd);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int pipelinetest()
|
|
||||||
{
|
|
||||||
int pipe1[2];
|
|
||||||
if (-1 == pipe(pipe1))
|
|
||||||
{
|
|
||||||
printf("creating pipe failed %d\n", errno);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int pipe1_out = pipe1[0];
|
|
||||||
int pipe1_in = pipe1[1];
|
|
||||||
|
|
||||||
int fd_flags = fcntl(pipe1_in, F_GETFL);
|
|
||||||
fcntl(pipe1_in, F_SETFL, fd_flags | O_NONBLOCK);
|
|
||||||
|
|
||||||
fd_flags = fcntl(pipe1_out, F_GETFL);
|
|
||||||
fcntl(pipe1_out, F_SETFL, fd_flags | O_NONBLOCK);
|
|
||||||
|
|
||||||
|
|
||||||
int max_fd = max(pipe1_in, pipe1_out) + 1;
|
|
||||||
|
|
||||||
fd_set read_set, write_set;
|
|
||||||
|
|
||||||
FD_ZERO(&read_set);
|
|
||||||
FD_ZERO(&write_set);
|
|
||||||
|
|
||||||
FD_SET(pipe1_out, &read_set);
|
|
||||||
FD_SET(pipe1_in, &write_set);
|
|
||||||
timeval time;
|
|
||||||
time.tv_sec = 60000;
|
|
||||||
time.tv_usec = 0;
|
|
||||||
char* input = "hi how are you?";
|
|
||||||
char read_buf[256];
|
|
||||||
|
|
||||||
while (-1 != select(max_fd, &read_set, &write_set, NULL, &time))
|
|
||||||
{
|
|
||||||
fd_set read_ret_set = read_set;
|
|
||||||
fd_set write_ret_set = write_set;
|
|
||||||
|
|
||||||
FD_ZERO(&read_set);
|
|
||||||
FD_ZERO(&write_set);
|
|
||||||
|
|
||||||
if (FD_ISSET(pipe1_in, &write_ret_set))
|
|
||||||
{
|
|
||||||
int to_write = strlen(input);
|
|
||||||
int written = write(pipe1_in, input, to_write);
|
|
||||||
if (written != to_write)
|
|
||||||
FD_SET(pipe1_in, &write_set);
|
|
||||||
else
|
|
||||||
FD_SET(pipe1_out, &read_set);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (FD_ISSET(pipe1_out, &read_ret_set))
|
|
||||||
{
|
|
||||||
int bytes_read = read(pipe1_out, read_buf, 256);
|
|
||||||
if (bytes_read > 0)
|
|
||||||
{
|
|
||||||
read_buf[bytes_read] = '\0';
|
|
||||||
printf("Received %s \n", read_buf);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int __cdecl main(void)
|
|
||||||
{
|
|
||||||
return regular();
|
|
||||||
//return async();
|
|
||||||
writemode = TRUE;
|
|
||||||
//return throughput();
|
|
||||||
//return pipetest();
|
|
||||||
}
|
|
@ -1,160 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
|
||||||
<ProjectConfiguration Include="Debug|Win32">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Debug|x64">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|Win32">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|x64">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
</ItemGroup>
|
|
||||||
<PropertyGroup Label="Globals">
|
|
||||||
<ProjectGuid>{D52F8255-C3A9-4416-A0A6-8CE63A4D7E43}</ProjectGuid>
|
|
||||||
<Keyword>Win32Proj</Keyword>
|
|
||||||
<RootNamespace>SampleServer</RootNamespace>
|
|
||||||
<ProjectName>SampleServer</ProjectName>
|
|
||||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v140</PlatformToolset>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v140</PlatformToolset>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v140</PlatformToolset>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v140</PlatformToolset>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
|
||||||
<ImportGroup Label="ExtensionSettings">
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<PropertyGroup Label="UserMacros" />
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<LinkIncremental>true</LinkIncremental>
|
|
||||||
<OutDir>$(ProjectDir)bin\$(Configuration)\</OutDir>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<LinkIncremental>true</LinkIncremental>
|
|
||||||
<OutDir>$(ProjectDir)bin\$(Platform)\$(Configuration)\</OutDir>
|
|
||||||
<IntDir>$(ProjectDir)bin\int\$(Platform)\$(Configuration)\</IntDir>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<LinkIncremental>false</LinkIncremental>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<LinkIncremental>false</LinkIncremental>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<SubSystem>Console</SubSystem>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<AdditionalDependencies>win32posix.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
<AdditionalLibraryDirectories>$(SolutionDir)bin\lib\$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<SubSystem>Console</SubSystem>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<AdditionalDependencies>win32posix.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
<AdditionalLibraryDirectories>$(SolutionDir)bin\lib\$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<Optimization>MaxSpeed</Optimization>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<SubSystem>Console</SubSystem>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<Optimization>MaxSpeed</Optimization>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<SubSystem>Console</SubSystem>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClInclude Include="stdafx.h" />
|
|
||||||
<ClInclude Include="targetver.h" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="SampleServer.cpp" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
||||||
<ImportGroup Label="ExtensionTargets">
|
|
||||||
</ImportGroup>
|
|
||||||
</Project>
|
|
@ -1,30 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup>
|
|
||||||
<Filter Include="Source Files">
|
|
||||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
|
||||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Header Files">
|
|
||||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
|
||||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Resource Files">
|
|
||||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
|
||||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
|
||||||
</Filter>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClInclude Include="stdafx.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="targetver.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="SampleServer.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
|
@ -1,15 +1,10 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio 14
|
# Visual Studio 14
|
||||||
VisualStudioVersion = 14.0.23107.0
|
VisualStudioVersion = 14.0.24720.0
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "win32posix", "win32posix\win32posix.vcxproj", "{D8744F47-1741-4FB8-97D3-EBB9C3A13E67}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "win32posix", "win32posix\win32posix.vcxproj", "{D8744F47-1741-4FB8-97D3-EBB9C3A13E67}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SampleServer", "SampleServer\SampleServer.vcxproj", "{D52F8255-C3A9-4416-A0A6-8CE63A4D7E43}"
|
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
|
||||||
{D8744F47-1741-4FB8-97D3-EBB9C3A13E67} = {D8744F47-1741-4FB8-97D3-EBB9C3A13E67}
|
|
||||||
EndProjectSection
|
|
||||||
EndProject
|
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnitTests", "UnitTests\UnitTests.vcxproj", "{31E868FF-DE6C-4CF7-9BF0-2C9B51DB58AD}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnitTests", "UnitTests\UnitTests.vcxproj", "{31E868FF-DE6C-4CF7-9BF0-2C9B51DB58AD}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
{D8744F47-1741-4FB8-97D3-EBB9C3A13E67} = {D8744F47-1741-4FB8-97D3-EBB9C3A13E67}
|
{D8744F47-1741-4FB8-97D3-EBB9C3A13E67} = {D8744F47-1741-4FB8-97D3-EBB9C3A13E67}
|
||||||
@ -31,14 +26,6 @@ Global
|
|||||||
{D8744F47-1741-4FB8-97D3-EBB9C3A13E67}.Release|Win32.Build.0 = Release|Win32
|
{D8744F47-1741-4FB8-97D3-EBB9C3A13E67}.Release|Win32.Build.0 = Release|Win32
|
||||||
{D8744F47-1741-4FB8-97D3-EBB9C3A13E67}.Release|x64.ActiveCfg = Release|x64
|
{D8744F47-1741-4FB8-97D3-EBB9C3A13E67}.Release|x64.ActiveCfg = Release|x64
|
||||||
{D8744F47-1741-4FB8-97D3-EBB9C3A13E67}.Release|x64.Build.0 = Release|x64
|
{D8744F47-1741-4FB8-97D3-EBB9C3A13E67}.Release|x64.Build.0 = Release|x64
|
||||||
{D52F8255-C3A9-4416-A0A6-8CE63A4D7E43}.Debug|Win32.ActiveCfg = Debug|Win32
|
|
||||||
{D52F8255-C3A9-4416-A0A6-8CE63A4D7E43}.Debug|Win32.Build.0 = Debug|Win32
|
|
||||||
{D52F8255-C3A9-4416-A0A6-8CE63A4D7E43}.Debug|x64.ActiveCfg = Debug|x64
|
|
||||||
{D52F8255-C3A9-4416-A0A6-8CE63A4D7E43}.Debug|x64.Build.0 = Debug|x64
|
|
||||||
{D52F8255-C3A9-4416-A0A6-8CE63A4D7E43}.Release|Win32.ActiveCfg = Release|Win32
|
|
||||||
{D52F8255-C3A9-4416-A0A6-8CE63A4D7E43}.Release|Win32.Build.0 = Release|Win32
|
|
||||||
{D52F8255-C3A9-4416-A0A6-8CE63A4D7E43}.Release|x64.ActiveCfg = Release|x64
|
|
||||||
{D52F8255-C3A9-4416-A0A6-8CE63A4D7E43}.Release|x64.Build.0 = Release|x64
|
|
||||||
{31E868FF-DE6C-4CF7-9BF0-2C9B51DB58AD}.Debug|Win32.ActiveCfg = Debug|Win32
|
{31E868FF-DE6C-4CF7-9BF0-2C9B51DB58AD}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{31E868FF-DE6C-4CF7-9BF0-2C9B51DB58AD}.Debug|Win32.Build.0 = Debug|Win32
|
{31E868FF-DE6C-4CF7-9BF0-2C9B51DB58AD}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{31E868FF-DE6C-4CF7-9BF0-2C9B51DB58AD}.Debug|x64.ActiveCfg = Debug|x64
|
{31E868FF-DE6C-4CF7-9BF0-2C9B51DB58AD}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
Loading…
x
Reference in New Issue
Block a user