This is Unofficial EPICS BASE Doxygen Site
osdSockUnsentCount.c
Go to the documentation of this file.
1 /*************************************************************************\
2 * EPICS BASE is distributed subject to a Software License Agreement found
3 * in file LICENSE that is included with this distribution.
4 \*************************************************************************/
5 
6 #define EPICS_PRIVATE_API
7 #include "osiSock.h"
8 #include <mstcpip.h>
9 
10 /*
11  * epicsSocketUnsentCount ()
12  * See https://docs.microsoft.com/en-us/windows/win32/api/mstcpip/ns-mstcpip-tcp_info_v0
13  */
15 #ifdef SIO_TCP_INFO
16 /* Windows 10 Version 1703 / Server 2016 */
17  DWORD infoVersion = 0, bytesReturned;
18  TCP_INFO_v0 tcpInfo;
19  int status;
20  if ((status = WSAIoctl(sock, SIO_TCP_INFO, &infoVersion, sizeof(infoVersion),
21  &tcpInfo, sizeof(tcpInfo), &bytesReturned, NULL, NULL)) == 0)
22  return tcpInfo.BytesInFlight;
23 #endif
24  return -1;
25 }
pvd::Status status
int epicsSocketUnsentCount(SOCKET sock)
#define NULL
Definition: catime.c:38
int SOCKET
Definition: osdSock.h:31