Ignore:
Timestamp:
Jul 31, 2007, 2:26:44 PM (14 years ago)
Author:
charles
Message:

continue whittling away at internal.h to reduce the global #include dependencies

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/net.h

    r2555 r2573  
    2323 *****************************************************************************/
    2424
     25#ifndef _TR_NET_H_
     26#define _TR_NET_H_
     27
     28#if defined(BEOS_NETSERVER) || defined(__MINGW__)
     29#include <stdint.h>
     30typedef uint16_t tr_port_t;
     31#else
     32#include <arpa/inet.h>
     33typedef in_port_t tr_port_t;
     34#endif
    2535
    2636struct in_addr;
     
    4353 * TCP and UDP sockets
    4454 **********************************************************************/
    45 #define tr_netOpenTCP( addr, port, priority ) \
    46     tr_netOpen( (addr), (port), SOCK_STREAM, (priority) )
    47 #define tr_netOpenUDP( addr, port, priority ) \
    48     tr_netOpen( (addr), (port), SOCK_DGRAM, (priority) )
    49 int  tr_netOpen    ( const struct in_addr * addr, tr_port_t port, int type,
    50                      int priority );
     55int  tr_netOpenTCP ( const struct in_addr * addr, tr_port_t port, int priority );
     56int  tr_netOpenUDP ( const struct in_addr * addr, tr_port_t port, int priority );
    5157int  tr_netMcastOpen( int port, const struct in_addr * addr );
    52 #define tr_netBindTCP( port ) tr_netBind( (port), SOCK_STREAM )
    53 #define tr_netBindUDP( port ) tr_netBind( (port), SOCK_DGRAM )
    54 int  tr_netBind    ( int port, int type );
     58int  tr_netBindTCP ( int port );
     59int  tr_netBindUDP ( int port );
    5560int  tr_netAccept  ( int s, struct in_addr *, tr_port_t * );
    5661void tr_netClose   ( int s );
     
    6671
    6772#define tr_addrcmp( aa, bb )    memcmp( ( void * )(aa), ( void * )(bb), 4)
     73
     74#endif /* _TR_NET_H_ */
Note: See TracChangeset for help on using the changeset viewer.