Classes | Macros | Typedefs | Enumerations | Functions
transport_common.cc File Reference
#include <openssl/base.h>
#include <string>
#include <vector>
#include <errno.h>
#include <limits.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <arpa/inet.h>
#include <fcntl.h>
#include <netdb.h>
#include <netinet/in.h>
#include <sys/select.h>
#include <sys/socket.h>
#include <unistd.h>
#include <openssl/err.h>
#include <openssl/ssl.h>
#include <openssl/x509.h>
#include "../crypto/internal.h"
#include "internal.h"
#include "transport_common.h"
Include dependency graph for transport_common.cc:

Go to the source code of this file.

Classes

class  SocketLineReader
 
class  SocketWaiter
 

Macros

#define _SCL_SECURE_NO_WARNINGS
 

Typedefs

using socket_result_t = ssize_t
 

Enumerations

enum  StdinWait { StdinWait::kStdinRead, StdinWait::kSocketWrite }
 

Functions

static int closesocket (int sock)
 
bool Connect (int *out_sock, const std::string &hostname_and_port)
 
bool DoHTTPTunnel (int sock, const std::string &hostname_and_port)
 
bool DoSMTPStartTLS (int sock)
 
static std::string GetLastSocketErrorString ()
 
bool InitSocketLibrary ()
 
void PrintConnectionInfo (BIO *bio, const SSL *ssl)
 
static void PrintSocketError (const char *function)
 
void PrintSSLError (FILE *file, const char *msg, int ssl_err, int ret)
 
static bool SendAll (int sock, const char *data, size_t data_len)
 
bool SocketSetNonBlocking (int sock, bool is_non_blocking)
 
static void SplitHostPort (std::string *out_hostname, std::string *out_port, const std::string &hostname_and_port)
 
bool TransferData (SSL *ssl, int sock)
 
bool VersionFromString (uint16_t *out_version, const std::string &version)
 

Macro Definition Documentation

◆ _SCL_SECURE_NO_WARNINGS

#define _SCL_SECURE_NO_WARNINGS

Definition at line 20 of file transport_common.cc.

Typedef Documentation

◆ socket_result_t

Definition at line 73 of file transport_common.cc.

Enumeration Type Documentation

◆ StdinWait

enum StdinWait
strong
Enumerator
kStdinRead 
kSocketWrite 

Definition at line 378 of file transport_common.cc.

Function Documentation

◆ closesocket()

static int closesocket ( int  sock)
static

Definition at line 74 of file transport_common.cc.

◆ Connect()

bool Connect ( int out_sock,
const std::string &  hostname_and_port 
)

Definition at line 142 of file transport_common.cc.

◆ DoHTTPTunnel()

bool DoHTTPTunnel ( int  sock,
const std::string &  hostname_and_port 
)

Definition at line 958 of file transport_common.cc.

◆ DoSMTPStartTLS()

bool DoSMTPStartTLS ( int  sock)

Definition at line 901 of file transport_common.cc.

◆ GetLastSocketErrorString()

static std::string GetLastSocketErrorString ( )
static

Definition at line 112 of file transport_common.cc.

◆ InitSocketLibrary()

bool InitSocketLibrary ( )

Definition at line 79 of file transport_common.cc.

◆ PrintConnectionInfo()

void PrintConnectionInfo ( BIO bio,
const SSL ssl 
)

Definition at line 284 of file transport_common.cc.

◆ PrintSocketError()

static void PrintSocketError ( const char *  function)
static

Definition at line 132 of file transport_common.cc.

◆ PrintSSLError()

void PrintSSLError ( FILE *  file,
const char *  msg,
int  ssl_err,
int  ret 
)

Definition at line 659 of file transport_common.cc.

◆ SendAll()

static bool SendAll ( int  sock,
const char *  data,
size_t  data_len 
)
static

Definition at line 881 of file transport_common.cc.

◆ SocketSetNonBlocking()

bool SocketSetNonBlocking ( int  sock,
bool  is_non_blocking 
)

Definition at line 354 of file transport_common.cc.

◆ SplitHostPort()

static void SplitHostPort ( std::string *  out_hostname,
std::string *  out_port,
const std::string &  hostname_and_port 
)
static

Definition at line 91 of file transport_common.cc.

◆ TransferData()

bool TransferData ( SSL ssl,
int  sock 
)

Definition at line 682 of file transport_common.cc.

◆ VersionFromString()

bool VersionFromString ( uint16_t out_version,
const std::string &  version 
)

Definition at line 267 of file transport_common.cc.



grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:35