libassa
3.5.1
assa
UnConUDPSocket.h
Go to the documentation of this file.
1
// -*- c++ -*-
2
//------------------------------------------------------------------------------
3
// UnConUDPSocket.h
4
//------------------------------------------------------------------------------
5
// Copyright (c) 1999 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: 04/01/99
13
//------------------------------------------------------------------------------
14
#ifndef UNCONUPD_SOCKET_H
15
#define UNCONUPD_SOCKET_H
16
17
#include "
assa/UDPSocket.h
"
18
19
namespace
ASSA
{
20
26
class
UnConUDPSocket
:
public
UDPSocket
{
27
public
:
29
UnConUDPSocket
();
30
32
~UnConUDPSocket
();
33
44
int
recvfrom
(
char
* buf_,
int
size_,
Address
* peer_addr_);
45
57
int
sendto
(
const
char
* buf_,
58
const
unsigned
int
size_,
59
const
Address
* dest_addr_);
60
66
virtual
int
in_avail
()
const
{
return
0; }
67
};
68
69
UnConUDPSocket::
70
UnConUDPSocket
() :
UDPSocket
()
71
{
72
trace_with_mask
(
"UnConUDPSocket::UnConUDPSocket"
,
SOCKTRACE
);
73
}
74
75
UnConUDPSocket::
76
~UnConUDPSocket
()
77
{
78
trace_with_mask
(
"UnConUDPSocket::~UnConUDPSocket"
,
SOCKTRACE
);
79
}
80
81
}
// end namespace ASSA
82
83
#endif // UNCONUPD_SOCKET_H
84
85
86
ASSA::UDPSocket
Definition:
UDPSocket.h:28
ASSA::UnConUDPSocket::recvfrom
int recvfrom(char *buf_, int size_, Address *peer_addr_)
recvfrom() function receives a message from connectionless-mode socket.
Definition:
UnConUDPSocket.cpp:25
ASSA::UnConUDPSocket::~UnConUDPSocket
~UnConUDPSocket()
Destructor.
Definition:
UnConUDPSocket.h:76
ASSA::UnConUDPSocket
Definition:
UnConUDPSocket.h:26
ASSA::UnConUDPSocket::sendto
int sendto(const char *buf_, const unsigned int size_, const Address *dest_addr_)
sendto() function sends a message through connectionless-mode socket.
Definition:
UnConUDPSocket.cpp:60
ASSA::SOCKTRACE
@ SOCKTRACE
Extended Socket & friends messages
Definition:
LogMask.h:42
ASSA::UnConUDPSocket::UnConUDPSocket
UnConUDPSocket()
Constructor.
Definition:
UnConUDPSocket.h:70
UDPSocket.h
ASSA
Definition:
Acceptor.h:40
ASSA::Address
Definition:
Address.h:51
trace_with_mask
#define trace_with_mask(s, m)
Definition:
Logger.h:437
ASSA::UnConUDPSocket::in_avail
virtual int in_avail() const
This function returns the number of characters immediately available in the get area of the underly...
Definition:
UnConUDPSocket.h:66
Generated by
1.8.17