Variant container for socket option values: integer or string. Implicit ctor/compares with int for backward compatibility.

Synopsis

Declared in <folly/io/SocketOptionValue.h>

class SocketOptionValue;

Member Functions

Name

Description

SocketOptionValue [constructor]

Constructors

asInt

Returns the int value; requires hasInt() to be true.

asString

Returns the string value; requires hasString() to be true.

hasInt

Returns true if the container holds an int.

hasString

Returns true if the container holds a string.

toString

Returns the held string, or the integer converted to a string.

Friends

Name

Description

folly::operator!=

Compares the value against a string for inequality.

folly::operator!=

Compares the value against an int for inequality.

folly::operator!=

Compares two values for inequality.

folly::operator==

Compares the value against a string.

folly::operator==

Compares the value against an int.

folly::operator==

Compares two values for equality.

Non-Member Functions

Name

Description

toAppend

Appends the string form of a value to the given string.

Created with MrDocs