19972009 Ericsson AB. All Rights Reserved. The contents of this file are subject to the Erlang Public License, Version 1.1, (the "License"); you may not use this file except in compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. httpd_socket Joakim Grebenö 1997-10-14 2.2 httpd_socket.sgml
httpd_socket 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.

deliver(SocketType, Socket, Data) -> Result Send binary data over socket. 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} Return the port and IP-address of the remote socket. SocketType = socket_type() Socket = socket() Port = integer() IPAddress = string()

peername/3 returns the Port and IPAddress of the remote Socket.

resolve() -> HostName Return the official name of the current host. HostName = string()

resolve/0 returns the official HostName of the current host.

SEE ALSO

httpd(3)