C++ TargetRTS
Loading...
Searching...
No Matches
RTinet.h
1/*
2 * Licensed Materials - Property of HCL and/or IBM
3 * Copyright HCL Technologies Ltd. 2016, 2021. All Rights Reserved.
4 * Copyright IBM Corporation 1999, 2016. All Rights Reserved.
5 *
6 * U.S. Government Users Restricted Rights - Use, duplication or
7 * disclosure restricted by GSA ADP Schedule.
8 */
9
10#ifndef __RTinet_h__
11#define __RTinet_h__ included
12
13#ifndef __RTConfig_h__
14#include <RTConfig.h>
15#endif
16
17#if HAVE_INET
18
19extern "C"
20{
21
22typedef struct { char b[ 4 ]; } RTinet_address;
23typedef unsigned short RTinet_port;
24
25#define INET_NO_SOCKET ( -1 )
26
27extern const RTinet_address RTinet_loopback;
28
29extern int RTinet_TCP_create( void );
30extern int RTinet_UDP_create( void );
31extern int RTinet_accept( int, RTinet_address *, RTinet_port * );
32extern int RTinet_async( int );
33extern int RTinet_bind( int, const RTinet_address *, RTinet_port );
34extern void RTinet_close( int );
35extern int RTinet_connect( int, const RTinet_address *, RTinet_port );
36extern int RTinet_getname( int, RTinet_address *, RTinet_port * );
37extern int RTinet_listen( int, int max = 5);
38extern int RTinet_lookup( const char *, RTinet_address * );
39extern int RTinet_nonblocking( int );
40extern int RTinet_primary( int, RTinet_address * );
41extern int RTinet_read( int, char *, int );
42extern int RTinet_recvfrom( int, char *, int,
43 RTinet_address *, RTinet_port * );
44extern int RTinet_reuseaddr( int );
45extern int RTinet_sendto( int, const char *, int,
46 const RTinet_address *, RTinet_port );
47extern int RTinet_write( int, const char *, int );
48
49}
50
51#endif // HAVE_INET
52
53#endif // __RTinet_h__
Definition: RTinet.h:22