## Metakit sample code - CatSend

This application is a simple TCP/IP client based on Winsock.

What it does: CatSend allows you to select a datafile and to transmit its contents over a TCP/IP connection. Although CatSend can handle any Metakit datafile, only the catalog files created by DisCat will make sense to the receiving program called "CatRecv" (see below). By altering the address shown on the screen, you can transfer the data across the network to any other machine on Internet running CatRecv... this is only a demonstration of what can be done, this serves no useful purpose whatsoever.

What it illustrates: CatSend illustrates how to work with Metakit datafiles of which the structure is unknown or only partially known. Since CatSend doesn't care, this program will continue to work even if DisCat and CatRecv are modified to use a different data structure on file.

How to use it: CatSend only makes sense in combination with Catrecv and DisCat. To try it out, you should first create a catalog file with DisCat which you can then pick up with CatSend. Note that like any typical client-server application, the CatRecv server application must be running before using CatSend to open a connection. Apart from selecting a datafile and transmitting it to CatRecv, the CatSend application is pretty boring. The "interesting" source code is less than 10 lines long...

Known problems: None, but since CatSend uses Winsock, you need to have a correctly installed version of the TCP/IP protocol stack (such as the one that comes with Windows 95).

You do not need an active network connection or any network hardware, since every TCP/IP installation can select local communication by using "localhost" as a host name (i.e. IP address 127.0.0.1). If you obtained this package from Internet via FTP, then you should be all set, since FTP access implies that you have a properly working TCP/IP configuration.

Files in EXAMPLES\CATSEND:

CATSEND.H, CATSEND.CPP - Main MFC application code
CATSEND.MAK, CATSEND.MDP - MSVC 4.2 project makefiles for Win32
CATSEND.RC - Application resources
MYDLG.H, MYDLG.CPP - Main dialog
RESOURCE.H - Resource symbol definitions
STDAFX.H, STDAFX.CPP - Used for precompiled headers
RES\*.* - Application resources

|| Roadmap Class Index Sample Index || Introduction Tips and Tricks ||