# httpd_socket

### MODULE

httpd_socket

### MODULE SUMMARY

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`.

| 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)

### AUTHORS

Joakim Grebenö - support@erlang.ericsson.se

inets 2.6.5
Copyright © 1991-2002 Ericsson Utvecklings AB