Loading...
Searching...
No Matches
ConUDPSocket.h
Go to the documentation of this file.
// -*- c++ -*-
//------------------------------------------------------------------------------
// ConUDPSocket.h
//------------------------------------------------------------------------------
// Copyright (C) 1997-2002 Vladislav Grinchenko
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//------------------------------------------------------------------------------
#ifndef CONUDP_SOCKET_H
#define CONUDP_SOCKET_H
#include "assa/UDPSocket.h"
namespace ASSA {
class ConUDPSocket : public UDPSocket {
public:
ConUDPSocket () : UDPSocket() {
char self[] = "ConUDPSocket::ConUDPSocket"; trace(self);
}
virtual ~ConUDPSocket () {
char self[] = "ConUDPSocket::~ConUDPSocket"; trace(self);
}
bool connect (const Address& peer_addr_);
void unconnect ();
int read (char* buf_, const unsigned int size_);
int write (const char* buf_ = NULL, const unsigned int size_ = 0);
virtual int in_avail () const { return 0; }
};
} // end namespace ASSA
#endif // CONUDP_SOCKET_H
trace
#define trace(s)
trace() is used to trace function call chain in C++ program.
Definition Logger.h:429
UDPSocket.h
Class UDPSocket is an implementation of UNIX domain socket that is the base class for more specialize...
ASSA::Address
Definition Address.h:51
ASSA::ConUDPSocket::connect
bool connect(const Address &peer_addr_)
Connect socket to the peer.
Definition ConUDPSocket.cpp:23
ASSA::ConUDPSocket::ConUDPSocket
ConUDPSocket()
Constructor.
Definition ConUDPSocket.h:27
ASSA::ConUDPSocket::unconnect
void unconnect()
Unconnect connected socket.
Definition ConUDPSocket.cpp:37
ASSA::ConUDPSocket::~ConUDPSocket
virtual ~ConUDPSocket()
Destructor.
Definition ConUDPSocket.h:32
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::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
ASSA::ConUDPSocket::read
int read(char *buf_, const unsigned int size_)
Read specified number of bytes off the socket.
Definition ConUDPSocket.cpp:64
ASSA::UDPSocket::UDPSocket
UDPSocket()
Default constructor.
Definition UDPSocket.h:31
ASSA
Definition Acceptor.h:40