.TH httpd_socket 3erl "inets 7.3.2" "Ericsson AB" "Erlang Module Definition" .SH NAME httpd_socket \- Communication utility functions to be used by the Erlang web server API programmer. .SH DESCRIPTION .LP This module provides the Erlang web server API module programmer with utility functions for generic sockets communication\&. The appropriate communication mechanism is transparently used, that is, \fIip_comm\fR\& or \fIssl\fR\&\&. .SH EXPORTS .LP .B deliver(SocketType, Socket, Data) -> Result .br .RS .LP Types: .RS 3 SocketType = socket_type() .br Socket = socket() .br Data = io_list() | binary() .br Result = socket_closed | void() .br .RE .RE .RS .LP \fIdeliver/3\fR\& sends \fIData\fR\& over \fISocket\fR\& using the specified \fISocketType\fR\&\&. \fISocket\fR\& and \fISocketType\fR\& is to be the socket and the \fIsocket_type\fR\& form the \fImod\fR\& record as defined in \fIhttpd\&.hrl\fR\& .RE .LP .B peername(SocketType,Socket) -> {Port,IPAddress} .br .RS .LP Types: .RS 3 SocketType = socket_type() .br Socket = socket() .br Port = integer() .br IPAddress = string() .br .RE .RE .RS .LP \fIpeername/2\fR\& returns the \fIPort\fR\& and \fIIPAddress\fR\& of the remote \fISocket\fR\&\&. .RE .LP .B resolve() -> HostName .br .RS .LP Types: .RS 3 HostName = string() .br .RE .RE .RS .LP \fIresolve/0\fR\& returns the official \fIHostName\fR\& of the current host\&. .RE .SH "SEE ALSO" .LP httpd(3erl)