Close a connection to a file or process
hclose x hclose[x]
Where x is a connection handle, closes the connection, and destroys the handle.
The corresponding integer can then no longer be applied to an argument.
q)show h:hopen `::5001
3i
q)h"til 5"
0 1 2 3 4
q)hclose h
q)h"til 5"
': Bad file descriptor
Async connections: pending data on the connection handle is not sent prior to closing. If flushing is required prior to close, this must be done explicitly. (Since V3.6 2019.09.19)
q)neg[h][];hclose h;