blob: 7768abd4703dddc9e5e9c929e5c8dcff62cd5e71 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
namespace vespalib {
/**
* Low-level functions used to adjust various socket related
* options. Return values indicate success/failure.
**/
struct SocketOptions {
static bool set_blocking(int fd, bool value);
static bool set_nodelay(int fd, bool value);
static bool set_reuse_addr(int fd, bool value);
static bool set_ipv6_only(int fd, bool value);
static bool set_keepalive(int fd, bool value);
static bool set_linger(int fd, bool enable, int value);
};
} // namespace vespalib
|