blob: c0368c2b39d2d3393d338935bd0a4565e4ce683b (
plain) (
tree)
|
|
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
<year>1997</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
</legalnotice>
<title>httpd_socket</title>
<prepared>Joakim Grebenö</prepared>
<docno></docno>
<date>1997-10-14</date>
<rev>2.2</rev>
<file>httpd_socket.sgml</file>
</header>
<module>httpd_socket</module>
<modulesummary>Communication utility functions to be used by the Erlang
Web server API programmer.</modulesummary>
<description>
<p>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 <c>ip_comm</c> or <c>ssl</c>.</p>
<marker id="deliver"></marker>
</description>
<funcs>
<func>
<name>deliver(SocketType, Socket, Data) -> Result</name>
<fsummary>Send binary data over socket.</fsummary>
<type>
<v>SocketType = socket_type()</v>
<v>Socket = socket()</v>
<v>Data = io_list() | binary()</v>
<v>Result = socket_closed | void()</v>
</type>
<desc>
<marker id="deliver"></marker>
<p><c>deliver/3</c> sends the <c>Binary</c> over the
<c>Socket</c> using the specified <c>SocketType</c>. Socket
and SocketType should be the socket and the socket_type form
the mod record as defined in httpd.hrl</p>
<marker id="peername"></marker>
</desc>
</func>
<func>
<name>peername(SocketType,Socket) -> {Port,IPAddress}</name>
<fsummary>Return the port and IP-address of the remote socket.</fsummary>
<type>
<v>SocketType = socket_type()</v>
<v>Socket = socket()</v>
<v>Port = integer()</v>
<v>IPAddress = string()</v>
</type>
<desc>
<marker id="peername"></marker>
<p><c>peername/3</c> returns the <c>Port</c> and
<c>IPAddress</c> of the remote <c>Socket</c>. </p>
<marker id="resolve"></marker>
</desc>
</func>
<func>
<name>resolve() -> HostName</name>
<fsummary>Return the official name of the current host.</fsummary>
<type>
<v>HostName = string()</v>
</type>
<desc>
<marker id="resolve"></marker>
<p><c>resolve/0</c> returns the official <c>HostName</c> of
the current host. </p>
</desc>
</func>
</funcs>
<section>
<marker id="see_also"></marker>
<title>SEE ALSO</title>
<p><seealso marker="httpd">httpd(3)</seealso></p>
</section>
</erlref>
|