close-passive-socketPortable Socketsmake-passive-socketlocal-hostname-and-portGoTo Top

local-hostname-and-port   socket-stream &optional do-not-resolve => hostname, port[Function]

Purpose
Return the name of the host on the local side of the socket-stream connection and its port number.

Package   :portable-sockets

Module   :portable-sockets

Arguments and values

socket-stream     A socket stream
do-not-resolve     A generalized boolean (default is nil)
hostname     A string
port     An integer

Returns
Two values:

See also
    open-connection
    remote-hostname-and-port
    with-open-connection

Examples
Return the local hostname and port of an open socket-stream connection to the wiki.alu.org web server:

  > (local-hostname-and-port connection)
  "192.168.240.104 (ruby.gbbopen.org)"
  56833
  >
Return the local hostname and port of the open socket-stream connection, but without hostname resolution:
  > (local-hostname-and-port connection 't)
  "192.168.240.104"
  56833
  >


The GBBopen Project


close-passive-socketPortable Socketsmake-passive-socketlocal-hostname-and-portGoTo Top