SECTION 10
Host Application Program
6950 Enterprise Gateway Server User’s Guide 10-13
/*****************************************************************
******************************************************************
** **
** nui_sock.c **
** **
** This is a demo program that uses sockets to send/receive data**
** to/from a Native Mode terminal via the nui_tlnt redirector **
** application. **
** **
** Usage: ./nui_sock <portno> **
** **
******************************************************************
*****************************************************************/
#include <stdio.h>
#include <errno.h>
#ifdef WIN32
#include <windows.h>
#define FD_SETSIZE 256 /* set to number of sockets to open */
#include <winsock.h>
#else
#include <sys/time.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <unistd.h>
#include <netinet/in.h>
#include <netdb.h>
#include <arpa/inet.h>
#endif
#define VERSION ”1.00”
unsigned int listen_fd;
unsigned short ipport;
char work_buf[1024];
char tdata[4096];
unsigned char param[]=”eD/@ OG00”;
int shut_down=0; /* true if program shutdown requested */
struct sockaddr_in cli_addr;
struct hostent host_rec;
fd_set read_fd_set;
fd_set main_fd_set;
Summary of Contents for 6950 EGS
Page 1: ...6950 Enterprise Gateway Server USER S GUIDE PN 961 047 091 Revision D September 1999 ...
Page 38: ...SECTION 3 Installation 3 22 6950 Enterprise Gateway Server User s Guide ...
Page 44: ...SECTION 4 Connecting to the 6950 EGS 4 6 6950 Enterprise Gateway Server User s Guide ...
Page 74: ...SECTION 5 Configuring Network Options 5 30 6950 Enterprise Gateway Server User s Guide ...
Page 138: ...SECTION 10 Host Application Program 10 24 6950 Enterprise Gateway Server User s Guide ...
Page 144: ...INDEX Index 6 6950 Enterprise Gateway Server User s Guide ...