C++ Sockets 2.2.9 (Default branch)


 
Thread Tools Search this Thread
Special Forums News, Links, Events and Announcements Software Releases - RSS News C++ Sockets 2.2.9 (Default branch)
# 1  
Old 01-31-2008
C++ Sockets 2.2.9 (Default branch)

C++ Sockets is a cross-platform C++ wrapper forBSD-style sockets. It implements the TCP, UDP,ICMP, and SCTP transport layer protocols.Implemented application layer protocols areHTTP/HTTPS (using OpenSSL), SMTP (server), andAjp/1.3 (server). Features include transparentSOCKS4 client support and asynchronous DNS.Included in the library are a number of HTTPclient functions such as GET/PUT/POST, and alsoWeb server framework components.License: GNU General Public License (GPL)Changes:
A memory leak in TcpSocket was fixed. Potentiallyunsafe code in the HTTP form data parser(HttpdForm) was fixed. A memory and resource leakin HttpRequest was fixed.Ajp13Socket/HttpBaseSocket now creates a copy ofthe HttpResponse instance when sending a response,to avoid synchronization problems. An unnecessarycall to shutdown() when destroying a closed tcpsocket was removed. A brief "INSTALL" document wasadded.Image

More...
Login or Register to Ask a Question

Previous Thread | Next Thread

1 More Discussions You Might Find Interesting

1. Programming

Help with sockets in C

if i have a server which wants to connect to exactly 5 clients, does that mean i need 5 socket file descriptors and use listen(socket_fd,1); for each one or just do listen(socket_fd,5) also whats the second parameter number mean? what happens if i put 0 there? also if i am connected... (28 Replies)
Discussion started by: omega666
28 Replies
Login or Register to Ask a Question
SOCKET_CREATE(3)							 1							  SOCKET_CREATE(3)

socket_create - Create a socket (endpoint for communication)

SYNOPSIS
resource socket_create (int $domain, int $type, int $protocol) DESCRIPTION
Creates and returns a socket resource, also referred to as an endpoint of communication. A typical network connection is made up of 2 sockets, one performing the role of the client, and another performing the role of the server. PARAMETERS
o $domain - The $domain parameter specifies the protocol family to be used by the socket. Available address/protocol families +---------+---------------------------------------------------+ | Domain | | | | | | | Description | | | | +---------+---------------------------------------------------+ | | | |AF_INET | | | | | | | IPv4 Internet based protocols. TCP and UDP are | | | common protocols of this protocol family. | | | | | | | |AF_INET6 | | | | | | | IPv6 Internet based protocols. TCP and UDP are | | | common protocols of this protocol family. | | | | | | | |AF_UNIX | | | | | | | Local communication protocol family. High effi- | | | ciency and low overhead make it a great form of | | | IPC (Interprocess Communication). | | | | +---------+---------------------------------------------------+ o $type - The $type parameter selects the type of communication to be used by the socket. Available socket types +---------------+---------------------------------------------------+ | Type | | | | | | | Description | | | | +---------------+---------------------------------------------------+ | | | | SOCK_STREAM | | | | | | | Provides sequenced, reliable, full-duplex, con- | | | nection-based byte streams. An out-of-band data | | | transmission mechanism may be supported. The TCP | | | protocol is based on this socket type. | | | | | | | | SOCK_DGRAM | | | | | | | Supports datagrams (connectionless, unreliable | | | messages of a fixed maximum length). The UDP pro- | | | tocol is based on this socket type. | | | | | | | |SOCK_SEQPACKET | | | | | | | Provides a sequenced, reliable, two-way connec- | | | tion-based data transmission path for datagrams | | | of fixed maximum length; a consumer is required | | | to read an entire packet with each read call. | | | | | | | | SOCK_RAW | | | | | | | Provides raw network protocol access. This spe- | | | cial type of socket can be used to manually con- | | | struct any type of protocol. A common use for | | | this socket type is to perform ICMP requests | | | (like ping). | | | | | | | | SOCK_RDM | | | | | | | Provides a reliable datagram layer that does not | | | guarantee ordering. This is most likely not | | | implemented on your operating system. | | | | +---------------+---------------------------------------------------+ o $protocol - The $protocol parameter sets the specific protocol within the specified $domain to be used when communicating on the returned socket. The proper value can be retrieved by name by using getprotobyname(3). If the desired protocol is TCP, or UDP the corre- sponding constants SOL_TCP, and SOL_UDP can also be used. Common protocols +-----+---------------------------------------------------+ |Name | | | | | | | Description | | | | +-----+---------------------------------------------------+ |icmp | | | | | | | The Internet Control Message Protocol is used | | | primarily by gateways and hosts to report errors | | | in datagram communication. The "ping" command | | | (present in most modern operating systems) is an | | | example application of ICMP. | | | | |udp | | | | | | | The User Datagram Protocol is a connectionless, | | | unreliable, protocol with fixed record lengths. | | | Due to these aspects, UDP requires a minimum | | | amount of protocol overhead. | | | | |tcp | | | | | | | The Transmission Control Protocol is a reliable, | | | connection based, stream oriented, full duplex | | | protocol. TCP guarantees that all data packets | | | will be received in the order in which they were | | | sent. If any packet is somehow lost during commu- | | | nication, TCP will automatically retransmit the | | | packet until the destination host acknowledges | | | that packet. For reliability and performance rea- | | | sons, the TCP implementation itself decides the | | | appropriate octet boundaries of the underlying | | | datagram communication layer. Therefore, TCP | | | applications must allow for the possibility of | | | partial record transmission. | | | | +-----+---------------------------------------------------+ RETURN VALUES
socket_create(3) returns a socket resource on success, or FALSE on error. The actual error code can be retrieved by calling socket_last_error(3). This error code may be passed to socket_strerror(3) to get a textual explanation of the error. ERRORS
/EXCEPTIONS If an invalid $domain or $type is given, socket_create(3) defaults to AF_INET and SOCK_STREAM respectively and additionally emits an E_WARNING message. SEE ALSO
socket_accept(3), socket_bind(3), socket_connect(3), socket_listen(3), socket_last_error(3), socket_strerror(3). PHP Documentation Group SOCKET_CREATE(3)