libassa
3.5.1
assa
ConUDPSocket.h
Go to the documentation of this file.
1
// -*- c++ -*-
2
//------------------------------------------------------------------------------
3
// ConUDPSocket.h
4
//------------------------------------------------------------------------------
5
// Copyright (C) 1997-2002 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
#ifndef CONUDP_SOCKET_H
13
#define CONUDP_SOCKET_H
14
15
#include "
assa/UDPSocket.h
"
16
17
namespace
ASSA
{
18
24
class
ConUDPSocket
:
public
UDPSocket
{
25
public
:
27
ConUDPSocket
() :
UDPSocket
() {
28
char
self
[] =
"ConUDPSocket::ConUDPSocket"
;
trace
(
self
);
29
}
30
32
virtual
~ConUDPSocket
() {
33
char
self
[] =
"ConUDPSocket::~ConUDPSocket"
;
trace
(
self
);
34
}
35
39
bool
connect
(
const
Address
& peer_addr_);
40
42
void
unconnect
();
43
54
int
read
(
char
* buf_,
const
unsigned
int
size_);
55
61
int
write
(
const
char
* buf_ = NULL,
const
unsigned
int
size_ = 0);
62
63
virtual
int
in_avail
()
const
{
return
0; }
64
};
65
66
}
// end namespace ASSA
67
68
#endif // CONUDP_SOCKET_H
69
70
71
ASSA::UDPSocket
Definition:
UDPSocket.h:28
ASSA::ConUDPSocket::connect
bool connect(const Address &peer_addr_)
Connect socket to the peer.
Definition:
ConUDPSocket.cpp:23
ASSA::ConUDPSocket
Definition:
ConUDPSocket.h:24
ASSA::ConUDPSocket::unconnect
void unconnect()
Unconnect connected socket.
Definition:
ConUDPSocket.cpp:37
ASSA::ConUDPSocket::read
int read(char *buf_, const unsigned int size_)
Read specified number of bytes off the socket.
Definition:
ConUDPSocket.cpp:64
ASSA::ConUDPSocket::~ConUDPSocket
virtual ~ConUDPSocket()
Destructor.
Definition:
ConUDPSocket.h:32
ASSA::ConUDPSocket::in_avail
virtual int in_avail() const
This function returns the number of characters immediately available in the get area of the underly...
Definition:
ConUDPSocket.h:63
trace
#define trace(s)
Definition:
Logger.h:429
ASSA::ConUDPSocket::ConUDPSocket
ConUDPSocket()
Constructor.
Definition:
ConUDPSocket.h:27
UDPSocket.h
ASSA
Definition:
Acceptor.h:40
ASSA::ConUDPSocket::write
int write(const char *buf_=NULL, const unsigned int size_=0)
Perform blocking write by writing packet of specified size.
Definition:
ConUDPSocket.cpp:80
ASSA::Address
Definition:
Address.h:51
Generated by
1.8.17