libsocket
unixclientstream.hpp
Go to the documentation of this file.
1 #ifndef LIBSOCKET_UNIXCLIENTSTREAM_H_9C64A16FB22D46FC9436989C1752F0CF
2 #define LIBSOCKET_UNIXCLIENTSTREAM_H_9C64A16FB22D46FC9436989C1752F0CF
3 
4 #include <string>
5 
6 #include "streamclient.hpp"
7 #include "unixbase.hpp"
8 
14 /*
15  The committers of the libsocket project, all rights reserved
16  (c) 2012, dermesser <lbo@spheniscida.de>
17 
18  Redistribution and use in source and binary forms, with or without
19  modification, are permitted provided that the following conditions are met:
20 
21  1. Redistributions of source code must retain the above copyright notice,
22  this list of conditions and the following disclaimer.
23  2. Redistributions in binary form must reproduce the above copyright notice,
24  this list of conditions and the following disclaimer in the documentation
25  and/or other materials provided with the distribution.
26 
27  THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS “AS IS” AND ANY
28  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
29  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
30  DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
31  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
32  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
33  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
34  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
35  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 
38 */
39 
40 namespace libsocket {
41 using std::string;
42 
50  public:
51  unix_stream_client(void);
52  unix_stream_client(const char* path, int socket_flags = 0);
53  unix_stream_client(const string& path, int socket_flags = 0);
54 
55  void connect(const char* path, int socket_flags = 0);
56  void connect(const string& path, int socket_flags = 0);
57 
58  friend class unix_stream_server;
59 };
65 } // namespace libsocket
66 #endif
Contains libsocket elements.
Definition: dgramclient.hpp:41
Base class for all UNIX socket classes.
Definition: unixbase.hpp:53
Provides an interface for working with UNIX STREAM sockets.
unix_stream_client(void)
Constructor.
Generic socket for active stream sockets (TCP client sockets, UNIX Stream clients)
Socket class for UNIX-domain STREAM socket server.
void connect(const char *path, int socket_flags=0)
Connect socket.