proxygen
|
Namespaces | |
detail | |
Classes | |
struct | PollDescriptor |
Functions | |
TEST (SocketFileDescriptorMap, fd_to_socket_consistent) | |
TEST (SocketFileDescriptorMap, no_socket_reuse) | |
TEST (SocketFileDescriptorMap, close_non_mapped_native_socket) | |
NetworkSocket | accept (NetworkSocket s, sockaddr *addr, socklen_t *addrlen) |
int | bind (NetworkSocket s, const sockaddr *name, socklen_t namelen) |
int | close (NetworkSocket s) |
int | connect (NetworkSocket s, const sockaddr *name, socklen_t namelen) |
int | getpeername (NetworkSocket s, sockaddr *name, socklen_t *namelen) |
int | getsockname (NetworkSocket s, sockaddr *name, socklen_t *namelen) |
int | getsockopt (NetworkSocket s, int level, int optname, void *optval, socklen_t *optlen) |
int | inet_aton (const char *cp, in_addr *inp) |
int | listen (NetworkSocket s, int backlog) |
int | poll (PollDescriptor fds[], nfds_t nfds, int timeout) |
ssize_t | recv (NetworkSocket s, void *buf, size_t len, int flags) |
ssize_t | recvfrom (NetworkSocket s, void *buf, size_t len, int flags, sockaddr *from, socklen_t *fromlen) |
ssize_t | recvmsg (NetworkSocket s, msghdr *message, int flags) |
ssize_t | send (NetworkSocket s, const void *buf, size_t len, int flags) |
ssize_t | sendmsg (NetworkSocket socket, const msghdr *message, int flags) |
ssize_t | sendto (NetworkSocket s, const void *buf, size_t len, int flags, const sockaddr *to, socklen_t tolen) |
int | setsockopt (NetworkSocket s, int level, int optname, const void *optval, socklen_t optlen) |
int | shutdown (NetworkSocket s, int how) |
NetworkSocket | socket (int af, int type, int protocol) |
int | socketpair (int domain, int type, int protocol, NetworkSocket sv[2]) |
int | set_socket_non_blocking (NetworkSocket s) |
int | set_socket_close_on_exec (NetworkSocket s) |
NetworkSocket folly::netops::accept | ( | NetworkSocket | s, |
sockaddr * | addr, | ||
socklen_t * | addrlen | ||
) |
Definition at line 71 of file NetOps.cpp.
Referenced by TestServer::acceptFD(), fizz::server::test::AsyncFizzServerTest::completeHandshake(), proxygen::HTTP1xCodec::generateWebsocketAccept(), fizz::server::detail::handleInvalidEvent(), folly::AsyncServerSocket::handlerReady(), proxygen::HTTP1xCodec::onHeadersComplete(), fizz::server::ServerStateMachine::processAccept(), folly::test::Server::Server(), proxygen::TEST_F(), fizz::server::test::TEST_F(), TEST_F(), testSetFromSocket(), and TestServer::verifyConnection().
int folly::netops::bind | ( | NetworkSocket | s, |
const sockaddr * | name, | ||
socklen_t | namelen | ||
) |
Definition at line 76 of file NetOps.cpp.
References folly::kIsWindows, name, and s.
Referenced by folly::ThreadPoolExecutor::addThreads(), BENCHMARK(), folly::AsyncUDPSocket::bind(), folly::AsyncServerSocket::bind(), wangle::ServerBootstrap< DefaultPipeline >::bindImpl(), folly::AsyncServerSocket::bindSocket(), folly::AsyncSocket::connect(), wangle::SSLContextManager::ctxSetupByOpensslFeature(), proxygen::QueueTest::dump(), proxygen::QueueTest::dumpBFS(), wangle::FilePoller::fileTouchedWithinCond(), TestAsyncTransport::fireNextReadEvent(), folly::TestSSLAsyncCacheServer::getSessionCallback(), proxygen::FakeHTTPCodecCallback::getStopFn(), wangle::LocalSSLSessionCache::LocalSSLSessionCache(), StaticService::StaticHandler::onEgressResumed(), StaticService::StaticHandler::onRequest(), run_basic_tests(), run_mt_sequencer_test(), runNeverFailTest(), runTryEnqDeqTest(), folly::runWritesNeverFail(), scheduleEvents(), folly::test::Server::Server(), folly::SNIServer::SNIServer(), TEST(), TEST_F(), testConnectOptWrite(), TestServer::TestServer(), testSetFromSocket(), ThreadExecutor::ThreadExecutor(), and tmpDisableReads().
int folly::netops::close | ( | NetworkSocket | s | ) |
Definition at line 90 of file NetOps.cpp.
References folly::netops::detail::SocketFileDescriptorMap::close(), and folly::NetworkSocket::data.
Referenced by BENCHMARK(), folly::AsyncUDPSocket::bind(), folly::test::CaptureFD::CaptureFD(), folly::netops::detail::SocketFileDescriptorMap::close(), BonkMultiplexClientDispatcher::close(), folly::AsyncUDPSocket::close(), testing::internal::posix::Close(), folly::SocketPair::closeFD0(), folly::SocketPair::closeFD1(), wangle::BroadcastHandler< T, R >::closeIfIdle(), folly::closeNoInt(), folly::SSLServerAcceptCallbackBase::connectionAccepted(), wangle::Acceptor::connectionAccepted(), wangle::Pipeline< int >::create(), proxygen::HTTPDirectResponseHandler::forceConnectionClose(), folly::getSchedTimeWaiting(), fizz::client::test::MockAsyncFizzClient::MockAsyncFizzClient(), folly::NotificationQueue< folly::AsyncServerSocket::QueueMessage >::NotificationQueue(), testing::internal::PortableLocaltime(), folly::Subprocess::prepareChild(), TelnetHandler::read(), FileServerHandler::read(), folly::WriteErrorCallback::readDataAvailable(), TelnetHandler::readEOF(), EchoHandler::readEOF(), ProxyFrontendHandler::readEOF(), TelnetHandler::readException(), EchoHandler::readException(), FileServerHandler::readException(), ProxyFrontendHandler::readException(), folly::test::CaptureFD::release(), folly::symbolizer::ElfFile::reset(), folly::test::runCloseTest(), folly::test::runKillTest(), folly::Subprocess::spawn(), folly::Subprocess::spawnInternal(), EventHandlerTest::TearDown(), TEST(), TEST(), TEST_F(), fizz::test::TEST_F(), testing::internal::TestResultAccessor::test_part_results(), testConnectOptWrite(), testing::internal::XmlUnitTestResultPrinter::TestPropertiesAsXmlAttributes(), testSetFromSocket(), testTemporaryDirectory(), ThreadPrintingHandler::transportActive(), ProxyFrontendHandler::transportActive(), folly::writeFileAtomicNoThrow(), folly::AsyncIO::~AsyncIO(), testing::internal::GTestLog::~GTestLog(), folly::NotificationQueue< folly::AsyncServerSocket::QueueMessage >::~NotificationQueue(), and TestServer::~TestServer().
int folly::netops::connect | ( | NetworkSocket | s, |
const sockaddr * | name, | ||
socklen_t | namelen | ||
) |
Definition at line 94 of file NetOps.cpp.
Referenced by fizz::client::test::AsyncFizzClientTest::completeEarlyHandshake(), fizz::client::test::AsyncFizzClientTest::completeHandshake(), fizz::client::FizzClient< ActionMoveVisitor, SM >::connect(), folly::AsyncUDPSocket::connect(), folly::test::createConnectedSocket(), fizz::sm::getEarlyDataParams(), wangle::BaseClientBootstrap< DefaultPipeline >::getPipeline(), fizz::client::test::MockAsyncFizzClient::MockAsyncFizzClient(), testing::internal::PortableLocaltime(), fizz::client::ClientStateMachine::processConnect(), folly::SSLClient::readDataAvailable(), folly::AsyncSocket::socketConnect(), UDPClient::start(), folly::TEST(), TEST(), TEST_F(), fizz::client::test::TEST_F(), testing::internal::XmlUnitTestResultPrinter::TestPropertiesAsXmlAttributes(), testSetFromSocket(), and ConnectedWriteUDPClient::writePing().
int folly::netops::getpeername | ( | NetworkSocket | s, |
sockaddr * | name, | ||
socklen_t * | namelen | ||
) |
Definition at line 104 of file NetOps.cpp.
Referenced by folly::ssl::OpenSSLUtils::getPeerAddressFromX509StoreCtx(), and folly::SocketAddress::setFromPeerAddress().
int folly::netops::getsockname | ( | NetworkSocket | s, |
sockaddr * | name, | ||
socklen_t * | namelen | ||
) |
Definition at line 108 of file NetOps.cpp.
Referenced by folly::test::Server::Server(), folly::SocketAddress::setFromLocalAddress(), and TEST_F().
int folly::netops::getsockopt | ( | NetworkSocket | s, |
int | level, | ||
int | optname, | ||
void * | optval, | ||
socklen_t * | optlen | ||
) |
Definition at line 112 of file NetOps.cpp.
Referenced by folly::SSLServerAcceptCallbackDelay::connAccepted(), folly::AsyncUDPSocket::getGSO(), folly::AsyncSocket::getSockOpt(), folly::AsyncSocket::getSockOptVirtual(), folly::AsyncSocket::handleConnect(), folly::AsyncServerSocket::handlerReady(), wangle::TransportInfo::readRTT(), folly::AsyncSocket::setZeroCopy(), folly::TEST(), and TEST().
int folly::netops::inet_aton | ( | const char * | cp, |
in_addr * | inp | ||
) |
Definition at line 132 of file NetOps.cpp.
int folly::netops::listen | ( | NetworkSocket | s, |
int | backlog | ||
) |
Definition at line 137 of file NetOps.cpp.
References s.
Referenced by folly::AsyncServerSocket::listen(), folly::test::Server::Server(), TEST(), TEST_F(), TestServer::TestServer(), and testSetFromSocket().
int folly::netops::poll | ( | PollDescriptor | fds[], |
nfds_t | nfds, | ||
int | timeout | ||
) |
Definition at line 141 of file NetOps.cpp.
Referenced by TestServer::acceptFD(), folly::Subprocess::communicate(), folly::Future< folly::folly::Unit >::Future(), folly::AsyncSocket::hangup(), folly::Subprocess::pollChecked(), folly::AsyncSocket::readable(), folly::Subprocess::returnCode(), folly::SemiFuture< T >::SemiFuture(), TEST(), folly::futures::detail::FutureBase< T >::valid(), and folly::AsyncSocket::writable().
ssize_t folly::netops::recv | ( | NetworkSocket | s, |
void * | buf, | ||
size_t | len, | ||
int | flags | ||
) |
Definition at line 180 of file NetOps.cpp.
References folly::NetworkSocket::data, s, and folly::detail::timeout.
Referenced by folly::AsyncSSLSocket::bioRead(), folly::AsyncSocket::performRead(), folly::TEST(), and TEST_F().
ssize_t folly::netops::recvfrom | ( | NetworkSocket | s, |
void * | buf, | ||
size_t | len, | ||
int | flags, | ||
sockaddr * | from, | ||
socklen_t * | fromlen | ||
) |
Definition at line 207 of file NetOps.cpp.
References folly::NetworkSocket::data, folly::pushmi::operators::from, h, and s.
Referenced by folly::AsyncUDPSocket::handleRead().
ssize_t folly::netops::recvmsg | ( | NetworkSocket | s, |
msghdr * | message, | ||
int | flags | ||
) |
Definition at line 268 of file NetOps.cpp.
References folly::NetworkSocket::data, h, i, message, s, and SCOPE_EXIT.
Referenced by folly::AsyncUDPSocket::handleErrMessages(), folly::AsyncSocket::handleErrMessages(), TEST(), and folly::ExpectWriteErrorCallback::~ExpectWriteErrorCallback().
ssize_t folly::netops::send | ( | NetworkSocket | s, |
const void * | buf, | ||
size_t | len, | ||
int | flags | ||
) |
Definition at line 319 of file NetOps.cpp.
References s.
Referenced by ZlibServerFilterTest::exercise_compression(), PushService::PushRequestHandler::onRequest(), sendmsg(), and TEST_F().
ssize_t folly::netops::sendmsg | ( | NetworkSocket | socket, |
const msghdr * | message, | ||
int | flags | ||
) |
Definition at line 328 of file NetOps.cpp.
References folly::NetworkSocket::data, h, i, message, send(), sendto(), and socket().
Referenced by folly::AsyncUDPSocket::sendmsg(), folly::AsyncSocket::sendSocketMessage(), TestAsyncUDPSocket::TestAsyncUDPSocket(), and ConnectedWriteUDPClient::writePing().
ssize_t folly::netops::sendto | ( | NetworkSocket | s, |
const void * | buf, | ||
size_t | len, | ||
int | flags, | ||
const sockaddr * | to, | ||
socklen_t | tolen | ||
) |
Definition at line 369 of file NetOps.cpp.
References s, and folly::to().
Referenced by sendmsg().
int folly::netops::set_socket_close_on_exec | ( | NetworkSocket | s | ) |
int folly::netops::set_socket_non_blocking | ( | NetworkSocket | s | ) |
Definition at line 441 of file NetOps.cpp.
References folly::NetworkSocket::data.
Referenced by folly::AsyncUDPSocket::bind().
int folly::netops::setsockopt | ( | NetworkSocket | s, |
int | level, | ||
int | optname, | ||
const void * | optval, | ||
socklen_t | optlen | ||
) |
Definition at line 384 of file NetOps.cpp.
References s, and SO_REUSEPORT.
Referenced by folly::AsyncSocket::OptionKey::apply(), folly::AsyncUDPSocket::bind(), folly::AsyncServerSocket::bind(), folly::AsyncServerSocket::bindSocket(), folly::test::Server::closeClients(), folly::SSLServerAcceptCallbackDelay::connAccepted(), folly::AsyncSocket::connect(), wangle::Acceptor::connectionAccepted(), folly::AsyncUDPSocket::dontFragment(), folly::ShutdownSocketSet::doShutdown(), folly::AsyncSocket::SendMsgParamsCallback::getDefaultFlags(), folly::AsyncServerSocket::handlerReady(), folly::AsyncSocket::setCongestionFlavor(), folly::AsyncUDPSocket::setErrMessageCallback(), folly::AsyncUDPSocket::setGSO(), folly::AsyncServerSocket::setKeepAliveEnabled(), folly::AsyncSocket::setNoDelay(), folly::AsyncSocket::setQuickAck(), folly::AsyncSocket::setRecvBufSize(), folly::AsyncServerSocket::setReusePortEnabled(), folly::AsyncSocket::setSendBufSize(), folly::AsyncSocket::setSockOpt(), folly::AsyncSocket::setSockOptVirtual(), folly::AsyncSocket::setTCPProfile(), folly::AsyncServerSocket::setTosReflect(), folly::AsyncServerSocket::setupSocket(), folly::AsyncServerSocket::setZeroCopy(), folly::AsyncSocket::setZeroCopy(), TestServer::TestServer(), and folly::AsyncServerSocket::useExistingSockets().
int folly::netops::shutdown | ( | NetworkSocket | s, |
int | how | ||
) |
NetworkSocket folly::netops::socket | ( | int | af, |
int | type, | ||
int | protocol | ||
) |
Definition at line 412 of file NetOps.cpp.
Referenced by wangle::AsyncServerSocketFactory::addAcceptCB(), wangle::AsyncUDPServerSocketFactory::addAcceptCB(), folly::AsyncUDPSocket::bind(), wangle::ServerBootstrap< DefaultPipeline >::bind(), folly::AsyncServerSocket::bind(), wangle::ServerBootstrap< DefaultPipeline >::bindImpl(), wangle::ClientBootstrap< DefaultPipeline >::connect(), folly::AsyncSocket::connect(), folly::test::createConnectedSocket(), folly::AsyncServerSocket::createSocket(), folly::AsyncServerSocket::dispatchSocket(), folly::AsyncServerSocket::getAddresses(), main(), folly::SocketAddress::makeFromPath(), wangle::AsyncServerSocketFactory::newSocket(), wangle::AsyncUDPServerSocketFactory::newSocket(), UDPAcceptor::onDataAvailable(), folly::AsyncUDPServerSocket::onDataAvailable(), wangle::ServerAcceptor< Pipeline >::onDataAvailable(), folly::AsyncUDPServerSocket::Callback::onListenResumed(), wangle::AcceptRoutingHandler< Pipeline, R >::onRoutingData(), wangle::AsyncUDPServerSocketFactory::ThreadSafeDestructor::operator()(), testing::internal::PortableLocaltime(), wangle::AcceptRoutingHandler< Pipeline, R >::read(), wangle::AsyncServerSocketFactory::removeAcceptCB(), sendmsg(), UDPAcceptor::sendPong(), folly::test::Server::Server(), serverSocketSanityTest(), folly::ssl::OpenSSLUtils::setBioFd(), folly::SendMsgParamsCallbackBase::setSocket(), folly::WriteCallbackBase::setSocket(), folly::ReadCallbackBase::setSocket(), folly::HandshakeCallback::setSocket(), folly::TEST(), TEST(), TEST(), TEST_F(), TEST_P(), testConnectOptWrite(), testing::internal::XmlUnitTestResultPrinter::TestPropertiesAsXmlAttributes(), TestServer::TestServer(), testSetFromSocket(), wangle::ServerWorkerPool::threadStarted(), wangle::ServerWorkerPool::threadStopped(), proxygen::HTTPServerOptions::useExistingSockets(), folly::ExpectWriteErrorCallback::~ExpectWriteErrorCallback(), and wangle::RoutingDataPipelineFactory< ObservingPipeline< T >, R >::~RoutingDataPipelineFactory().
int folly::netops::socketpair | ( | int | domain, |
int | type, | ||
int | protocol, | ||
NetworkSocket | sv[2] | ||
) |
Definition at line 416 of file NetOps.cpp.
Referenced by folly::getfds(), folly::SocketPair::SocketPair(), and TEST().
folly::netops::TEST | ( | SocketFileDescriptorMap | , |
fd_to_socket_consistent | |||
) |
folly::netops::TEST | ( | SocketFileDescriptorMap | , |
no_socket_reuse | |||
) |
Definition at line 43 of file SocketFileDescriptorMapTest.cpp.
References folly::netops::detail::SocketFileDescriptorMap::close(), close(), EXPECT_EQ, EXPECT_NE, folly::netops::detail::SocketFileDescriptorMap::fdToSocket(), folly::kIsWindows, socket(), and folly::netops::detail::SocketFileDescriptorMap::socketToFd().
folly::netops::TEST | ( | SocketFileDescriptorMap | , |
close_non_mapped_native_socket | |||
) |
Definition at line 77 of file SocketFileDescriptorMapTest.cpp.
References folly::netops::detail::SocketFileDescriptorMap::close(), and socket().