httpd_socket(3)

MODULE
httpd_socket - Communication utility functions to be used by the EWSAPI programmer.

DESCRIPTION

This module provides the EWSAPI module programmer with utility functions for generic sockets communication. The appropriate communication mechanism is transparently used, that is ip_comm or ssl.

  Warning:

The current implementation of EWSAPI is under review and feedback is welcomed.

EXPORTS

deliver(SocketType,Socket,Binary) -> Result

    Types
        SocketType = ip_comm | {ssl, SSLConfigString}
        SSLConfigString = string()
        Socket = socket()
        Binary = binary()
        Result = socket_closed | void()

    deliver/3 sends a Binary over a Socket in 2kB chunks using the specified SocketType. SSLConfigString is a SSL configuration string as described in the SSL application documentation.

peername(SocketType,Socket) -> {Port,IPAddress}

    Types
        SocketType = ip_comm | {ssl, SSLConfigString}
        SSLConfigString = string()
        Socket = socket()
        Port = integer()
        IPAddress = string()

    peername/3 returns the Port and IPAddress of the remote Socket. SSLConfigString is a SSL configuration string as described in the SSL application documentation.

resolve() -> HostName

    Types
        HostName = string()

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

SEE ALSO

httpd(3)

AUTHOR
Joakim Grebenö  - support@erlang.ericsson.se