After all communication is completed, use the $DASSGN system
service to free an I/O channel. A $DASSGN operation executed
on a channel associated with a network pseudodevice does the
following:
o Ends all pending operations to send or receive data at $QIO
level ($CANCEL system service).
o Clears the port associated with the channel. When executing
the $DASSGN system service for TCP sockets, the socket remains
until the connection is closed on both the local and remote
sides.
o Ends all communications with the network pseudodevice that the
I/O channel identifies.
o Frees the channel associated with the network pseudodevice. An
I/O channel can be deassigned only from an access mode equal
to or more privileged than the access mode from which the
original channel assignment was made.
I/O channels assigned from user mode are automatically deassigned
at image exit.
NOTE
Even after a $DASSGN has been issued, a TCP socket may
remain until the TCP close timeout interval expires. The
default and maximum timeout interval is either 10 minutes
if the peer host is not responding or 30 seconds after
acknowledging the socket close. Although the TCP socket
is open, you cannot make a reference to that socket after
issuing a $DASSGN.