Message178675
> It has at least one potential use. On Windows socket.detach() returns a
> socket handle but there is no documented way to close it -- os.close()
> will not work. The only way to close it that I can see (without resorting
> to ctypes) is with something like
>
> socket.socket(fileno=handle).close()
There is an alternative (documented) interface:
socket.fromfd(handle, socket.AF_INET, socket.SOCK_STREAM).close() |
|
Date |
User |
Action |
Args |
2012-12-31 14:11:18 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, gvanrossum, pitrou, giampaolo.rodola, ezio.melotti, docs@python, sbt |
2012-12-31 14:11:18 | serhiy.storchaka | link | issue16802 messages |
2012-12-31 14:11:18 | serhiy.storchaka | create | |
|