libassa
3.5.1
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
assa
UDPSocket.h
Go to the documentation of this file.
1
// -*- c++ -*-
2
//------------------------------------------------------------------------------
3
// UDPSocket.h
4
//------------------------------------------------------------------------------
5
// Copyright (c) 1999,2006 by Vladislav Grinchenko
6
//
7
// This library is free software; you can redistribute it and/or
8
// modify it under the terms of the GNU Library General Public
9
// License as published by the Free Software Foundation; either
10
// version 2 of the License, or (at your option) any later version.
11
//------------------------------------------------------------------------------
12
// Created: 03/22/99
13
//------------------------------------------------------------------------------
14
#ifndef UDP_SOCKET_H
15
#define UDP_SOCKET_H
16
17
#include "
assa/Socket.h
"
18
19
namespace
ASSA {
20
28
class
UDPSocket
:
public
Socket
{
29
public
:
31
UDPSocket
()
32
{
33
trace
(
"UDPSocket::UDPSocket()"
);
34
}
35
39
UDPSocket
(
const
handler_t
fd_)
40
{
41
trace
(
"UDPSocket::UDPSocket(fd)"
);
42
m_fd
= fd_;
43
}
44
46
virtual
~UDPSocket
()
47
{
48
trace
(
"UDPSocket::~UDPSocket"
);
49
}
50
58
bool
open
(
const
int
domain_);
59
63
bool
close
();
64
71
bool
bind
(
const
Address
& my_address_);
72
74
handler_t
getHandler
()
const
{
return
m_fd
; }
75
77
const
int
getDomain
()
const
{
return
m_type
; }
78
79
protected
:
81
void
setHandler
(
const
int
fd_) {
m_fd
= fd_; }
82
84
void
setDomain
(
const
int
type_) {
m_type
= type_; }
85
};
86
87
}
// end namespace ASSA
88
89
#endif // UDP_SOCKET_H
90
91
Generated on Tue Jun 19 2012 07:42:07 for libassa by
1.8.1.1