socket.cc File Reference
#include "squid.h"
#include "socket.hh"
#include <cerrno>
#include <cstring>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <unistd.h>
#include "convert.hh"
Include dependency graph for socket.cc:

Go to the source code of this file.

Functions

int setSocketBuffers (int sockfd, int size)
 
int getSocketNoDelay (int sockfd)
 
int setSocketNoDelay (int sockfd, bool)
 
static int commonCode (int &sockfd, bool nodelay, int sendBufferSize, int recvBufferSize)
 
int connectTo (struct in_addr host, unsigned short port, bool nodelay, int sendBufferSize, int recvBufferSize)
 
int serverSocket (struct in_addr host, unsigned short port, int backlog, bool reuse, bool nodelay, int sendBufferSize, int recvBufferSize)
 

Function Documentation

◆ commonCode()

static int commonCode ( int sockfd,
bool  nodelay,
int  sendBufferSize,
int  recvBufferSize 
)
static

Definition at line 124 of file socket.cc.

References sockfd.

Referenced by connectTo(), and serverSocket().

◆ connectTo()

int connectTo ( struct in_addr  host,
unsigned short  port,
bool  nodelay,
int  sendBufferSize,
int  recvBufferSize 
)

Definition at line 168 of file socket.cc.

References commonCode(), port, server, and sockfd.

Referenced by action().

◆ getSocketNoDelay()

int getSocketNoDelay ( int  sockfd)

Definition at line 89 of file socket.cc.

References sockfd.

◆ serverSocket()

int serverSocket ( struct in_addr  host,
unsigned short  port,
int  backlog,
bool  reuse,
bool  nodelay,
int  sendBufferSize,
int  recvBufferSize 
)

Definition at line 203 of file socket.cc.

References commonCode(), my_sock_ntoa(), port, SA, server, sockfd, and strerror().

◆ setSocketBuffers()

int setSocketBuffers ( int  sockfd,
int  size 
)

Definition at line 66 of file socket.cc.

References size, and sockfd.

◆ setSocketNoDelay()

int setSocketNoDelay ( int  sockfd,
bool   
)

Definition at line 107 of file socket.cc.

References sockfd.

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors