socket-bind/inet-sockaddr

Name

socket-bind/inet-sockaddr -- Bind a socket to a socket address (IP and port)

Type: function

Synopsis

socket-bind/inet-sockaddr( sockfd sockaddr, );

Arguments

sockfd

An instance of <fixnum>

sockaddr

An instance of <inet-socket-addr>

Description

Binds the socket specified by sockfd to an internet socket address, including the IP address and port number. This is useful when writing a server for a multi-homed host or host with IP aliases. For example, an HTTP server present on only one or a subset of IP addresses of a server. This function allows the application to bind to only one IP address, or bind different socket file descriptors to different IP addresses.