Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:10:12

0001 /**
0002  * Copyright (c) 2017-present, Facebook, Inc.
0003  * All rights reserved.
0004  *
0005  * This source code is licensed under the BSD-style license found in the
0006  * LICENSE file in the root directory of this source tree.
0007  */
0008 
0009 #pragma once
0010 
0011 #include <string>
0012 
0013 #include <sys/socket.h>
0014 
0015 namespace gloo {
0016 namespace transport {
0017 namespace tcp {
0018 
0019 struct attr {
0020   attr() {}
0021   /* implicit */ attr(const char* ptr) : hostname(ptr) {}
0022 
0023   std::string hostname;
0024 
0025   std::string iface;
0026 
0027   // The address family defaults to AF_UNSPEC such that getaddrinfo(3)
0028   // will try to find either IPv4 or IPv6 addresses.
0029   int ai_family = AF_UNSPEC;
0030   int ai_socktype;
0031   int ai_protocol;
0032   struct sockaddr_storage ai_addr;
0033   int ai_addrlen;
0034 };
0035 
0036 } // namespace tcp
0037 } // namespace transport
0038 } // namespace gloo