Claw
1.7.3
basic_socket.hpp
Go to the documentation of this file.
1
/*
2
CLAW - a C++ Library Absolutely Wonderful
3
4
CLAW is a free library without any particular aim but being useful to
5
anyone.
6
7
Copyright (C) 2005-2011 Julien Jorge
8
9
This library is free software; you can redistribute it and/or
10
modify it under the terms of the GNU Lesser General Public
11
License as published by the Free Software Foundation; either
12
version 2.1 of the License, or (at your option) any later version.
13
14
This library is distributed in the hope that it will be useful,
15
but WITHOUT ANY WARRANTY; without even the implied warranty of
16
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
Lesser General Public License for more details.
18
19
You should have received a copy of the GNU Lesser General Public
20
License along with this library; if not, write to the Free Software
21
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22
23
contact: julien.jorge@gamned.org
24
*/
31
#ifndef __CLAW_BASIC_SOCKET_HPP__
32
#define __CLAW_BASIC_SOCKET_HPP__
33
34
#include <string>
35
#include <
claw/socket_traits.hpp
>
36
37
namespace
claw
38
{
39
namespace
net
40
{
46
class
basic_socket
47
{
48
public
:
49
basic_socket
();
50
51
basic_socket
*
open
();
52
basic_socket
*
close
();
53
54
bool
is_open
()
const
;
55
56
protected
:
58
socket_traits::descriptor
m_descriptor
;
59
60
};
// class basic_socket
61
}
// namespace net
62
}
// namespace claw
63
#endif // __CLAW_BASIC_SOCKET_HPP__
claw::net::basic_socket::basic_socket
basic_socket()
Constructor.
Definition:
basic_socket.cpp:37
claw::net::basic_socket::is_open
bool is_open() const
Tell if the socket is open.
Definition:
basic_socket.cpp:84
claw
This is the main namespace.
Definition:
algorithm.hpp:33
claw::net::basic_socket::m_descriptor
socket_traits::descriptor m_descriptor
File descriptor.
Definition:
basic_socket.hpp:58
socket_traits.hpp
Include the good interface for sockets for your system.
claw::net::basic_socket::open
basic_socket * open()
Open the socket.
Definition:
basic_socket.cpp:48
claw::net::basic_socket
Common interface for claw::net::basic_socketbuf and claw::net::socket_server.
Definition:
basic_socket.hpp:46
claw::net::basic_socket::close
basic_socket * close()
Close the socket.
Definition:
basic_socket.cpp:65
claw::socket_traits_unix::descriptor
int descriptor
Type of the system description of the socket.
Definition:
socket_traits_unix.hpp:54
Generated on Tue Mar 24 2020 14:05:44 for Claw by
1.8.17