httpd_socket
(inets)Communication utility functions to be used by the Erlang Web server API programmer.
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 ip_comm
or ssl
.
Functions
deliver(SocketType, Socket, Data) -> Result
SocketType = socket_type()
Socket = socket()
Data = io_list() | binary()
Result = socket_closed | void()
deliver/3
sends the Binary
over the
Socket
using the specified SocketType
. Socket
and SocketType should be the socket and the socket_type form
the mod record as defined in httpd.hrl
peername(SocketType,Socket) -> {Port,IPAddress}
SocketType = socket_type()
Socket = socket()
Port = integer()
IPAddress = string()
peername/3
returns the Port
and
IPAddress
of the remote Socket
.
resolve() -> HostName
HostName = string()
resolve/0
returns the official HostName
of
the current host.