prefect
Home Engineering Publications
DACS: TCP/IP Server Library Header, server.h
 
  next up previous contents
Next: TCP/IP Server Library Code, Up: MIDI Controller Previous: TCP/IP Client Library Code,   Contents

TCP/IP Server Library Header, server.h

This header provides definitions and function prototypes for the TCP/IP server library functions.
/*****************************************************************************
 * DACS : Distributed Audio Control System
 *============================================================================
 *         File: server.h
 *  Description: TCP/IP server routines, header file
 *       Author: Stephen S. Richardson
 * Date Created: 04.23.95
 *  Environment: GNU C Compiler (GCC) v2.7.1, Linux i486 v2.0.28
 *        Build: library
 *============================================================================
 * The code, executables, documentation, firmware images, and all related
 * material of DACS are  
 * Copyright (C) 1997 Stephen S. Richardson - ALL RIGHTS RESERVED
 *****************************************************************************
 * Source code control:
 *
 * $Id: server.h,v 1.1 1997/07/25 12:15:41 prefect Exp prefect $
 *
 *****************************************************************************/

#ifndef SERVER_
#define SERVER_

#define DATA                1
#define NODATA              0

#define SUCCESS             1

#define ERROR_KILL          -13
#define ERROR_WRITEFAILED   -14
#define ERROR_HANGUP        -15
#define ERROR_READ          -16

#define ERROR_BADHOST       -100
#define ERROR_SOCKET        -101
#define ERROR_BIND          -102
#define ERROR_LISTEN        -103
#define ERROR_ACCEPT        -104


struct ipaddx {
  unsigned char first;
  unsigned char second;
  unsigned char third;
  unsigned char fourth;
} ipaddx;

extern int tcpEstablishServer (char *hostname, int port);
extern int tcpAcceptConn (int s, struct ipaddx *ip);
extern int tcpKillConn (int fd);
extern int tcpWriteBuffer (int fd, char *buffer, size_t bufsize);
extern int tcpDataWaiting (int sfd);
extern int tcpReadBuffer (int fd, char *buffer, int bufsize);

#endif


Steve Richardson 2000-07-06
Table of Contents

[PDF] [Whole document in PDF 1.9MB]

[more photos and information]

 
Page last modified:
Copyright © 1993-2000 prefect - All Rights Reserved.