dp_atclose sockId option ?cmd?The dp_atclose command manages the dp_atclose list, a list of callback routines that are evaluated just before sockId is actually closed. This is useful for networking applications, where filehandlers associated with a socket must be deleted when a socket is closed. The argument option specifies the operation to be performed on the dp_atclose list. The valid options are:
dp_atclose sockId listReturns the current dp_atclose list associated with sockId.
dp_atclose sockId set newListSets the dp_atclose list associated with sockId to newList.
dp_atclose sockId append callbackAppend callback to the end of the dp_atclose list associated with sockId.
dp_atclose sockId appendUnique callbackAppends callback to the end of the dp_atclose list associated with sockId if it's not already a member of the list.
dp_atclose sockId prepend callbackInserts callback at the front of the dp_atclose list associated with sockId.
dp_atclose sockId insert beforeCallback callbackInserts callback before beforeCallback in the dp_atclose list associated with sockId. If beforeCallback is not in the dp_atclose list associated with sockId, no action is taken.
dp_atclose sockId delete callbackDelete callback from the dp_atclose list associated with sockId. If callback is not in the dp_atclose list associated with sockId, no action is taken.
dp_atclose sockId clearClears the dp_atclose list associated with sockId.