Tcp4u was written by Philippe Jounin and Laurent Le Bras and is Copyrighted 1996-1998 by them.
This library is free software; you can redistribute it and/or modify it under the terms the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Tcp4u provides portable APIs which allow an easy use of the following IETF protocols :
The Tcp4u functions have been compiled and tested under the following operating system:
Tcp4u is available at the following sites :
Since Tcp4u is freeware, it has no official support. However, i try to help you as best as i can. Thus if you have some problem, please send your comments to Philippe Jounin.
If you find errors in the documentation, please be lenient: First i am French, furthermore i do not like write docs files (but who does?). Send me the corrected text, i will update this documentation for the next release.
If you intend to use Tcp4u under Unix, you have to compile the library. Please refer to the file Unix/INSTALL. Then you should have the following files :
Since Tcp4u was originally written for Windows, its uses Windows types. Their definitions are given in the file tcp4u.h. The most widely used are:
||a 16 bit-unsigned integer |
||a pointer to a variable memory location |
||a pointer to a non-writeable memory location |
||This attribute is only meaningful for Windows 3.1. |
The first function that an application should call is Tcp4uInit. It allocates buffers and get some information about the task which has called it. The task is ready to open connections.
The application can now establish connections with a remote server with TcpConnect (client) or wait for an incoming connection with both TcpGetListenSocket and TcpAccept. It can either use any HTTP functions.
Before quitting, the application must close opened sockets with TcpClose, and call Tcp4uCleanup.
This table lists alphabetically all the functions implemented in this version. The remainder
of the documentation describes them one by one.
||Last function to be called, frees local resources |
||Allows tracing of received/sent frames and functions |
||First function to be called |
||Gives the 2-part version of the library (packed into an int). |
||Returns name and address of the local host |
||Returns error string about an error code |
||Aborts the current blocking call |
||Waits for a incoming connection |
||Closes a socket |
||Establishes a connection to a peer |
||Flushes the buffer associated with a socket |
||Creates a socket and listen for incoming connection |
||Returns name and address of the connected host |
||Returns TRUE if unread data are available |
||Returns TRUE if unread Out of Band data are available |
||Receives data with length of frame in the two first bytes |
||Sends data, the two first bytes of the frame are its length |
||Receives data |
||Receives data until a given character/string |
||Sends data to connected host |
||Receives data until end of a Telnet frame |
||Completes a full telnet dialog |
||Receives data until an end of line (10 ASCII) |
||Receives a full Tenet frame |
||Sends a 0-terminated string |
||Sends a 0-terminated string. Handles end of line |
||Returns an error string about a HTTP return code |
||Changes the internal buffer size |
||Changes the internal timeout |
||Retrieves a file using the HTTP protocol |
||Retrieves both files and headers using the HTTP protocol |
||Translates a service into a port identifier |
||Forces a socket to communicate only with a given host |
||Destroys the local UDP socket |
||Creates a local UDP socket |
||sends a datagram to a previously given host |
||Receives or wait for a datagram |
||Sends a text string using the SMTP protocol. |
|Overview||Multi purpose func.||TCP functions||Telnet related func||HTTP functions||UDP functions||SMTP functions|
|Tcp4u version 3.31 by Ph. Jounin and Laurent Le Bras||Last updated: 10th march 1998|