summaryrefslogtreecommitdiff
path: root/comm/Datagram.h
blob: cc7798fdfd2cd81cf2cc5cfed221f19f5bfb9de9 (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
/*
 *	The Unix Channel
 *
 *	by Michel Beaudouin-Lafon
 *
 *	Copyright 1990-1997
 *	Laboratoire de Recherche en Informatique (LRI)
 *
 *	Datagrams
 *
 *	$Id$
 *	$CurLog$
 */

#ifndef Datagram_H_
#define Datagram_H_

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

class UchDatagram : public UchSocket {
protected:
	UchAddress*	FAddr;

public:
		UchDatagram (UchAddress* = 0, UchAddress* = 0);
		~UchDatagram ();	
		UchDatagram (const UchDatagram& d);
	UchChannel*	Copy () const;
	int		SockType ();
	int		Send (byte*, int, UchAddress&);
	int		Receive (byte*, int);
inline	UchAddress*	From ()			{ return FAddr; }
	int		Reply (byte*, int);
	int		Send (UchMsgBuffer& b, UchAddress& a, bool = false);
	int		Receive (UchMsgBuffer& b);
	int		Reply (UchMsgBuffer& b, bool = false);
};

#endif	/* Datagram_H_ */