VMS Help
TCPIP Services, Programming Interfaces, Sockets API, $DASSGN
*Conan The Librarian (sorry for the slow response - running on an old VAX)
|
|
Deassigns (releases) an I/O channel previously acquired using the
Assign I/O Channel ($ASSIGN) service.
Related Functions
The equivalent Sockets API function is close().
Format
SYS$DASSGN chan
C Prototype
int sys$dassgn (unsigned short int chan);
Returns
OpenVMS usage:cond_value
type: longword (unsigned)
access: write only
mechanism: by value
Longword condition value. All system services return (by
immediate value) a condition value in R0. Condition values that
can be returned by this service are listed under Condition Values
Returned.
chan
OpenVMS usage:channel
type: word (unsigned)
access: read only
mechanism: by value
Number of the I/O channel to be deassigned. The chan argument is
a word containing this number.
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.
3 - Condition Values Returned
|
SS$_NORMAL The service completed successfully.
SS$_IVCHAN An invalid channel number was specified (that
is, a channel number of zero or a number
larger than the number of channels available).
SS$_NOPRIV The specified channel is not assigned or is
assigned from a more privileged access mode.
[legal]
[privacy]
[GNU]
[policy]
[netiquette]
[sponsors]
[FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.