126 Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide
Programming Examples
LAN Programming Interface Examples
* sockets. Instead, the functions send() and recv() MUST be
used.
*****************************************************************/
/* Support both Win32 and HP-UX UNIX environment */
#ifdef _WIN32 /* Visual C++ 6.0 will define this */
# define WINSOCK
#endif
#ifndef WINSOCK
# ifndef _HPUX_SOURCE
# define _HPUX_SOURCE
# endif
#endif
#include <stdio.h> /* for fprintf and NULL */
#include <string.h> /* for memcpy and memset */
#include <stdlib.h> /* for malloc(), atol() */
#include <errno.h> /* for strerror */
#ifdef WINSOCK
#include <windows.h>
# ifndef _WINSOCKAPI_
# include <winsock.h> // BSD-style socket functions
# endif
#else /* UNIX with BSD sockets */
# include <sys/socket.h> /* for connect and socket*/
# include <netinet/in.h> /* for sockaddr_in */
# include <netdb.h> /* for gethostbyname */
Содержание X-Series
Страница 4: ...4 ...
Страница 10: ...10 Contents ...