gtpc2m8nC/C++ Language Support User's Guide

tpf_tcpip_message_cnt-Update the Message Counters for TCP/IP Applications

This function updates the message counters for TCP/IP applications.

Format

include   <socket.h>
void       tpf_tcpip_message_cnt(int cnt, int port, const char *proto, int messages);

cnt
An integer that specifies which counter to update. Specify one of the following:

NSDB_OUTPUT_CNT
Updates the output message counter.

NSDB_INPUT_CNT
Updates the input message counter.

port
The port of the server application.

proto
The protocol of the server application.

messages
The number of messages by which to increment the counter.

Normal Return

Void.

Error Return

Not Applicable.

Programming Considerations

Examples

The following example updates the inbound message counter for a TCP/IP server application at port 5001.

#include <socket.h>
 
int cnt;
int port;
int messages;
char proto[4] = "TCP";
 
port  = 5001;
messages = 1;
cnt = NSDB_INPUT_CNT;
 
tpf_tcpip_message_cnt(cnt, port, proto, messages);
 

Related Information

See TPF Transmission Control Protocol/Internet Protocol for more information about TCP/IP network services database support.