Click here to Skip to main content
15,893,381 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   793   20  
A library for writing simple TCP client applications
/*---------------- Search Box */
#FSearchBox {
    float: left;
}
#MSearchBox {
    padding: 0px;
    margin: 0px;
    border: none;
    border: 1px solid #84B0C7;
    white-space: nowrap;
    -moz-border-radius: 8px;
    -webkit-border-top-left-radius: 8px;
    -webkit-border-top-right-radius: 8px;
    -webkit-border-bottom-left-radius: 8px;
    -webkit-border-bottom-right-radius: 8px;
}
#MSearchField {
    font: 9pt Arial, Verdana, sans-serif;
    color: #999999;
    background-color: #FFFFFF;
    font-style: normal;
    cursor: text;
    padding: 1px 1px;
    margin: 0px 6px 0px 0px;
    border: none;
    outline: none;
    vertical-align: middle;
}
.MSearchBoxActive #MSearchField {
    color: #000000;
}
#MSearchSelect {
    float : none;
    display : inline;
    background : none;
    font: 9pt Verdana, sans-serif;
    border: none;
    margin: 0px 0px 0px 6px;
    vertical-align: middle;
    padding: 0px 0px;
}

#MSearchClose {
    float : none;
    display : none;
    background : none;
    border: none;
    margin: 0px 4px 0px 0px;
    padding: 0px 0px;
    outline: none;
}

#MSearchCloseImg {
    vertical-align: middle;
}

.MSearchBoxLeft {
    display: block;
    text-align: left;
    float: left;
    margin-left: 6px;
}
.MSearchBoxRight {
    display: block;
    float: right;
    text-align: right;
    margin-right: 6px;
}
.MSearchBoxSpacer {
    font-size: 0px;
    clear: both;
}
.MSearchBoxRow {
    font-size: 0px;
    clear: both;
}

/*---------------- Search filter selection */

#MSearchSelectWindow {
    display: none;
    position: absolute;
    left: 0; top: 0;
    border: 1px solid #A0A0A0;
    background-color: #FAFAFA;
    z-index: 1;
    padding-top: 4px;
    padding-bottom: 4px;
    -moz-border-radius: 4px;
    -webkit-border-top-left-radius: 4px;
    -webkit-border-top-right-radius: 4px;
    -webkit-border-bottom-left-radius: 4px;
    -webkit-border-bottom-right-radius: 4px;
    -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
    }
.SelectItem {
    font: 8pt Arial, Verdana, sans-serif;
    padding-left:  2px;
    padding-right: 12px;
    border: 0px;
}
span.SelectionMark {
    margin-right: 4px;
    font-family: monospace;
    outline-style: none;
    text-decoration: none;
}
a.SelectItem {
    display: block;
    outline-style: none;
    color: #000000; 
    text-decoration: none;
    padding-left:   6px;
    padding-right: 12px;
}
a.SelectItem:focus,
a.SelectItem:active {
    color: #000000; 
    outline-style: none;
    text-decoration: none;
}
a.SelectItem:hover {
    color: #FFFFFF;
    background-color: #2A50E4;
    outline-style: none;
    text-decoration: none;
    cursor: pointer;
    display: block;
}

/*---------------- Search results window */

iframe#MSearchResults {
    width: 60ex;
    height: 15em;
    }
#MSearchResultsWindow {
    display: none;
    position: absolute;
    left: 0; top: 0;
    border: 1px solid #000000;
    background-color: #EEF3F5;
    }

/* ----------------------------------- */


#SRIndex {
    clear:both; 
    padding-bottom: 15px;
}

.SREntry {
    font-size: 10pt;
    padding-left: 1ex;
}
.SRPage .SREntry {
    font-size: 8pt;
    padding: 1px 5px;
}
body.SRPage {
    margin: 5px 2px;
}

.SRChildren {
    padding-left: 3ex; padding-bottom: .5em 
}
.SRPage .SRChildren {
    display: none;
}
.SRSymbol {
    font-weight: bold; color: #153788;
    font-family: Arial, Verdana, sans-serif;
    text-decoration: none;
    outline: none;
}

a.SRScope {
    display: block;
    color: #153788; 
    font-family: Arial, Verdana, sans-serif;
    text-decoration: none;
    outline: none;
}

a.SRSymbol:focus, a.SRSymbol:active,
a.SRScope:focus, a.SRScope:active {
    text-decoration: underline;
}

.SRPage .SRStatus {
    padding: 2px 5px;
    font-size: 8pt;
    font-style: italic;
}

.SRResult {
    display: none;
}

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