chickadee » socket » inet-address

inet-address addr portprocedure

Returns a sockaddr object constructed from IP address addr (a string) and port port (a number or numeric string). If the address or port input is invalid, an error is raised.

If addr is #f, the unspecified address is used ("::" or "0.0.0.0"). If port is #f, the unspecified port is used (integer 0). It is an error for both addr and port to be unspecified.

Note that when IPv6 is preferred on your system, the unspecified address #f is typically "::" and the resulting object will be of family af/inet6. This may not be what you want, so it is a good idea to specify which unspecified address (yes, really) you mean -- "::" or "0.0.0.0" -- in lieu of #f.