better peername/sockname support