/*
**     $VER: rtgmaster_protos.h 1.016 (22 Sep 1997)
*/

#ifndef CLIB_RTGEXTRA_PROTOS_H
#define CLIB_RTGEXTRA_PROTOS_H

#ifndef EXEC_TYPES_H
#include <exec/types.h>
#endif

#ifndef UTILITY_TAGITEM_H
#include <utility/tagitem.h>
#endif

#ifndef RTGMASTER_RTGTCPIP_H
#include <rtgmaster/rtgTCPIP.h>
#endif

struct RTG_Socket  *OpenClient(struct Library *SBase, char *host, int port, int mode, int protocol);
struct RTG_Socket *OpenServer(struct Library *SBase, int port, int mode, int protocol);
void CloseClient(struct Library *SBase, struct RTG_Socket *s);
void CloseServer(struct Library *SBase, struct RTG_Socket *s);
struct RTG_Socket *RunServer(struct Library *SBase, struct RTG_Socket *s, struct RTG_Buff *in_buffer, struct RTG_Buff *out_buffer, int maxplayers);
int RtgSend(struct Library *SBase, struct RTG_Socket *s, char *message, struct sockaddr_in *receiver, int len);
int RtgRecv(struct Library *SBase, struct RTG_Socket *s, char *message, struct sockaddr_in *sender, int len);
struct RTG_Socket *RtgAccept(struct Library *SBase, struct RTG_Socket *s);
int RtgIoctl(struct Library *SBase,struct RTG_Socket *s,long *arg);
struct sockaddr_in *GetUDPName(struct Library *SBase, struct RTG_Socket *s);
char *RtgInAdr(struct Library *SBase, struct sockaddr_in *si);

#endif
