2 +--------------------------------------------------------------------+
3 | libmemcached - C/C++ Client Library for memcached |
4 +--------------------------------------------------------------------+
5 | Redistribution and use in source and binary forms, with or without |
6 | modification, are permitted under the terms of the BSD license. |
7 | You should have received a copy of the license in a bundled file |
8 | named LICENSE; in case you did not receive a copy you can review |
9 | the terms online at: https://opensource.org/licenses/BSD-3-Clause |
10 +--------------------------------------------------------------------+
11 | Copyright (c) 2006-2014 Brian Aker https://datadifferential.com/ |
12 | Copyright (c) 2020 Michael Wallner <mike@php.net> |
13 +--------------------------------------------------------------------+
20 #include <sys/socket.h>
25 explicit Connection(socket_or_port_t socket_or_port);
28 friend void swap(Connection &a, Connection &b);
29 void swap(Connection &conn);
31 Connection(const Connection &conn);
32 Connection &operator=(const Connection &conn);
34 Connection(Connection &&conn) noexcept;
35 Connection &operator=(Connection &&conn) noexcept;
47 int sock{-1}, last_err{-1};
48 sockaddr_storage addr{};
51 UNIX = sizeof(sockaddr_un),
52 INET = sizeof(sockaddr_in),
53 INET6 = sizeof(sockaddr_in6)
55 bool connected{false};
57 static string error(const initializer_list<string> &args);