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)
 
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

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

Definition at line 124 of file socket.cc.

Referenced by connectTo(), and serverSocket().

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, and sockfd.

Referenced by action().

int getSocketNoDelay ( int  sockfd)

Definition at line 89 of file socket.cc.

References len.

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, sockfd, and strerror().

int setSocketBuffers ( int  sockfd,
int  size 
)

Definition at line 66 of file socket.cc.

int setSocketNoDelay ( int  sockfd,
bool   
)

Definition at line 107 of file socket.cc.

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors