libsocket
unixclientdgram.hpp
Go to the documentation of this file.
1 #ifndef LIBSOCKET_UNIXCLIENTDGRAM_H_1A0CF567F9A946AA80C64654F35DFA9E
2 #define LIBSOCKET_UNIXCLIENTDGRAM_H_1A0CF567F9A946AA80C64654F35DFA9E
3 
4 #include "dgramclient.hpp"
5 #include "unixdgram.hpp"
6 
7 #include <string>
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_dgram_client(int flags = 0);
52  unix_dgram_client(const char* path, int flags = 0);
53  unix_dgram_client(const string& path, int flags = 0);
54 
55  void setup(const char* path, int flags = 0);
56 
57  void connect(const char* path);
58  void connect(const string& path);
59 
60  void deconnect(void);
61 };
65 } // namespace libsocket
66 
67 #endif
Contains libsocket elements.
Definition: dgramclient.hpp:41
void setup(const char *path, int flags=0)
Set a UNIX domain datagram socket up.
Represents a generic "client" datagram socket, i.e. a datagram socket which can be connected.
Definition: dgramclient.hpp:53
void connect(const char *path)
Connect a UNIX datagram socket.
Generic class for all UNIX datagram (DGRAM) sockets, implementing i/o functions.
Definition: unixdgram.hpp:45
Class for UNIX datagram sockets.
void deconnect(void)
Disconnect a UNIX datagram socket.
unix_dgram_client(int flags=0)
Constructor with only socket() flags.