[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MIT-Scheme-users] Simple Client/Server
From: |
Taylor R Campbell |
Subject: |
Re: [MIT-Scheme-users] Simple Client/Server |
Date: |
Mon, 27 Apr 2009 19:41:34 -0400 |
User-agent: |
IMAIL/1.21; Edwin/3.116; MIT-Scheme/7.7.90.+ |
Date: Mon, 27 Apr 2009 15:21:03 -0700
From: address@hidden (Matt Birkholz)
open-tcp-server-socket returns a port. You never close it. You only
pass it to read-line, once.
The manual says close-tcp-server-socket does not affect existing
connections. They will not be closed until Scheme exits (unless the
client closes its end).
The last sentence is not quite correct. Scheme will periodically
close unreferenced sockets after garbage collection. Also, in the
version in CVS, some cases of file descriptor exhaustion will trigger
a garbage collection to close unreferenced sockets.
Nevertheless, as you suggest, it is good practice to close the socket
explicitly.