I just got ciao yesterday, and for my first program in it I wrote a little hello-server (accept connections, greet them, close them.) Part of the hello-server is an announce-connection/1 that takes the Socket stream and writes something like
"Recieved a connection from 1.0.1.0:12345"
... which is a little difficult to write in Ciao, because it doesn't have any kind of getsockname. Servers in ciao have no way to know who they're getting connections from!
I'd suggest
ip_socket_name/3 (+Socket, -Host, -Port)
(actually I'd suggest 'ip-socket-name', but the above is more consistent.)
where Host is an atom such as as '1.0.1.0' and Port is an atom such as 12345. The "ip-" in "ip-socket-name" is there because the hostname/port part of a socket address structure is defined at the IP level ("tcp-" would be inappropriate, since UDP sockets have the same address structure).
_________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com ============================================================================== Message: Address: Action: help majordomo(a)clip.dia.fi.upm.es Info. on useful commands subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list <whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list ----------------------------------------------------------------------------- Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/ -----------------------------------------------------------------------------