ip_ports.c - Internet Protocol PORTS routines
This is the main initialization file for the TCP & UDP PORTS subsystem.
This subsystem supports TCP sending or receiving and UDP broadcasting &
receiving of datagrams (ASCII or binary data) using the Windows 32 bit
winsock DLL. This module contains the alloc & free code as well as the
connect to the DLL code required by Windows.
Function
|
alloc_IP_SOCK
|
Include file
|
IP_PORTS.H
|
Prototype
|
IP_SOCK * alloc_IP_SOCK( int type )
|
Remarks
|
Allocate, initialize and return a IP socket structure. The type can be
either SOCKET_UDP or SOCKET_TCP. This routine is front-ended by 2 macros
alloc_udp_connection() and alloc_tcp_connection(). This routine will also
load WIN32's winsock.
|
Function
|
free_IP_SOCK
|
Include file
|
IP_PORTS.H
|
Prototype
|
void free_IP_SOCK( IP_SOCK *ip_ptr )
|
Remarks
|
Close and free either type of IP_SOCK.
|
Function
|
connect_to_winsock
|
Include file
|
IP_PORTS.H
|
Prototype
|
void connect_to_winsock( void )
|
Remarks
|
Make sure we've got a reasonably new WIN32 winsock (and load it).
|
Function
|
send_datagram
|
Include file
|
IP_PORTS.H
|
Prototype
|
int send_datagram( IP_SOCK *ip_ptr )
|
Remarks
|
Send a UDP datagram out the socket.
|
Function
|
receive_datagram
|
Include file
|
IP_PORTS.H
|
Prototype
|
int receive_datagram( IP_SOCK *ip_ptr )
|
Remarks
|
Receive a UDP datagram from the socket. This code supports both blocked
and non-blocked reads.
|
Function
|
load_datagram
|
Include file
|
IP_PORTS.H
|
Prototype
|
void load_datagram( IP_SOCK *ip_ptr , void *dt_buff , int size )
|
Remarks
|
Check max size and load an IP_SOCK's datagram area with a user data buffer.
|
Table of Contents
Function Index
generated on 22 September 1998 - 12:55:03
© 1998 Tierra del Fuego Ltd.
|