summaryrefslogtreecommitdiff
path: root/comm/Datagram.h
blob: 60c0ac4a17ad6c7d2dc0e1b62421011525f67b4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
 *	Ivy League
 *
 *	Datagrams
 *
 *	Copyright 1990-2000
 *	Laboratoire de Recherche en Informatique (LRI)
 *	Centre d'Etudes de la Navigation Aerienne (CENA)
 *
 *	original code by Michel Beaudouin-Lafon,
 *	modified by Stephane Chatty
 *
 *	$Id$
 *
 */

#ifndef Datagram_H_
#define Datagram_H_

#include "cplus_bugs.h"
#include "ivl/bool.h"
#include "ivl/word.h"
#include "Socket.h"

class IvlDatagram : public IvlSocket {
protected:
	IvlAddress*	FAddr;

public:
		IvlDatagram (IvlAddress* = 0, IvlAddress* = 0);
		~IvlDatagram ();	
		IvlDatagram (const IvlDatagram& d);
	IvlChannel*	Copy () const;
	int		SockType ();
	int		Send (byte*, int, IvlAddress&);
	int		Receive (byte*, int);
inline	IvlAddress*	From ()			{ return FAddr; }
	int		Reply (byte*, int);
	int		Send (IvlMsgBuffer& b, IvlAddress& a, bool = false);
	int		Receive (IvlMsgBuffer& b);
	int		Reply (IvlMsgBuffer& b, bool = false);
};

#endif	/* Datagram_H_ */