Click here to Skip to main content
15,884,836 members
Articles / Programming Languages / C

A Generic C-Language TCP Client Application

Rate me:
Please Sign up or sign in to vote.
3.67/5 (2 votes)
9 May 2010CPOL4 min read 29.1K   789   20  
A library for writing simple TCP client applications
/// @source      Time.h
/// @description Public interface for the Time formatting facility.
//  See licensing information in the file README.TXT.

// -----------------------------------------------------------------------------
#ifndef __TIME_H__
#define __TIME_H__
// -----------------------------------------------------------------------------

#include <time.h>

// -----------------------------------------------------------------------------
#ifdef __cplusplus
extern "C" {
#endif
// -----------------------------------------------------------------------------

// the redundancy here is for doxygen documentation

/// see Time::time_formatCurrentDate
extern TC2API void time_formatCurrentDate(char*);

/// see Time::time_formatCurrentShortDatePacked
extern TC2API void time_formatCurrentShortDatePacked(char*);

/// see Time::time_formatCurrentShortDateReversePacked
extern TC2API void time_formatCurrentShortDateReversePacked(char*);

/// see Time::time_formatCurrentTime
extern TC2API void time_formatCurrentTime(char*);

/// see Time::time_formatCurrentTimePacked
extern TC2API void time_formatCurrentTimePacked(char*);

/// see Time::time_formatDate
extern TC2API void time_formatDate(char*, time_t);

/// see Time::time_formatShortDatePacked
extern TC2API void time_formatShortDatePacked(char*, time_t);

/// see Time::time_formatShortDateReversePacked
extern TC2API void time_formatShortDateReversePacked(char*, time_t);

/// see Time::time_formatTime
extern TC2API void time_formatTime(char*, time_t);

/// see Time::time_formatTimePacked
extern TC2API void time_formatTimePacked(char*, time_t);

// -----------------------------------------------------------------------------
#ifdef __cplusplus
} // #ifdef __cplusplus
#endif
// -----------------------------------------------------------------------------
#endif // __TIME_H__
// -----------------------------------------------------------------------------

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
zvx
Software Developer
Brazil Brazil
I'm a long-time software developer living in Brazil.

I've been developing software for retail and banking automation in C/C++ for many years now. In the old days I even did some COBOL programming, and some assembly for the 8080.

My experience ranges from low level software such as interface code for serial devices for DOS and Windows (bar code scanners, printers, cash dispensers, etc) and goes to writing end user applications for POS terminals and bank ATMs. In between I've done a great deal of TCP/IP programming using the basic Berkeley sockets interface, which is my main interest nowadays.

Comments and Discussions