version 1.25, 2005/02/24 03:16:30
|
version 1.26, 2005/02/24 21:47:28
|
|
|
/* | /* |
* Unit tests for 32-bit socket functions in Wine |
* Unit tests for 32-bit WinSock 1.1 functions in Wine |
* | * |
* Copyright (c) 2005 Thomas Kho, Fredy Garcia, Douglas Rosenberg | * Copyright (c) 2005 Thomas Kho, Fredy Garcia, Douglas Rosenberg |
* | * |
|
|
static void BlockingClient(int *serverPort) | static void BlockingClient(int *serverPort) |
{ | { |
SOCKET sock; | SOCKET sock; |
SOCKADDR_IN client, server; |
SOCKADDR_IN server; |
HOSTENT *hp; | HOSTENT *hp; |
int connectError; | int connectError; |
int totCharsReceived = 0; | int totCharsReceived = 0; |
|
|
int memSame; | int memSame; |
char buf[1001]; | char buf[1001]; |
| |
StartNetworkApp(SOCK_STREAM, &sock, &client); |
// create socket |
|
sock = socket(AF_INET, SOCK_STREAM, 0); |
|
ok( sock != INVALID_SOCKET , "Error in socket()\n"); |
|
if (sock == INVALID_SOCKET) { |
|
WSACleanup(); |
|
exit(0); |
|
} |
| |
hp = gethostbyname("localhost"); | hp = gethostbyname("localhost"); |
| |