This is TCPLib.h in view mode; [Download] [Up]
/* TCP Network Libary - Methods of Libary BY: Kevin A. Hoogheem Saint Mary's University of Minnesota */ #ifndef TCPLIB_H #define TCPLIB_H #import <objc/Object.h> #import <objc/objc.h> #import <sys/param.h> #import <sys/types.h> #import <sys/socket.h> #import <netinet/in.h> #import <arpa/inet.h> #import <errno.h> #import <ctype.h> #import <stdlib.h> #import <netdb.h> #import <stdio.h> #import <string.h> #import <libc.h> #define MAXHOSTNAME 64 #define BUFSIZE 1024 #define MAXLISTENS 5 #define INITVAL -1 #define DEBUG 1 enum { RAW_SOCK, DGRAM_SOCK, STREAM_SOCK }; @interface TCPNetwork: Object { int sock; //used for the initial set up } + new; + new: (int)sock_value; - initialize; - initialize: (int)sock_value; - (int)open_port: (int)port; - (int)close_network; - (int)call: (char *)machine_name on_port: (int)port; - (int)call: (char *)machine_name using: (char *)protocol; - (int)send_text: (char *)message; - (int)send_text: (char *)message of_length: (int)length; - (int)send_file: (char *)file; - (int)readline: (char *)ptr of_length: (int)maxlen; - (int)receive; /* use with call waiting */ - (int)recv_text: (char *)message; - (int)recv_text: (char *)message of_length: (int)length; - recv_file: (char *)file; - data_waiting; //wait for data to act on - call_waiting; //wait for a connection to act on. - get_remote_system_name; - get_remote_user_name; - (int)get_service_port: (char *)service service_type: (int)type; - print; @end #endif
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.