for (i = 0; i < dwNumberOfClients; i++)
{
TotalIterations += ClientData[i].IoBuffer.u.IAmDone.TotalIterations;
TotalBytesTransferred += ClientData[i].IoBuffer.u.IAmDone.TotalBytesTransferred;
//
// Bind our server to the agreed upon port number. See
// commdef.h for the actual port number.
//
ZeroMemory (&localAddr, sizeof (localAddr));
localAddr.sin_port = htons (SERVPORT);
localAddr.sin_family = AF_INET;
err = bind (listener, (PSOCKADDR) & localAddr, sizeof (localAddr));
if (err == SOCKET_ERROR)
{
fprintf (stdout, "Socket Bind Failed\n");
if (WSAGetLastError () == WSAEADDRINUSE)
fprintf (stdout, "The port number may already be in use.\n");
return FALSE;
}
if (fVerbose)
{
fprintf (stdout, "Client Connection Accepted\n");
}
//
// note the 16 says how many concurrent cpu bound threads to allow thru
// this should be tunable based on the requests. CPU bound requests will
// really really honor this.
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// Copyright (C) 1993-1997 Microsoft Corporation. All Rights Reserved.
//
// MODULE: socksrv.h
//
// PURPOSE: Definitions and prototypes for socksrv.c
//