GetSocketNumber (Socket function)

From m204wiki
Revision as of 19:33, 8 November 2011 by 198.242.244.47 (talk) (Created page with " <span class="pageSubtitle"><section begin=dpl_desc/><section end=dpl_desc/></span> GetSocketNumber function <p> <var>GetSocketNumber</var> is a membe...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

<section begin=dpl_desc/><section end=dpl_desc/>

GetSocketNumber is a member of the Socket class.

This method returns a socket number for the method Socket object. The returned number can then be used with $Sock_xxx calls, so $Sock_xxx code can be used in conjunction with a Socket object.

Syntax

%snum = %socko:GetSocketNumber

Syntax terms

%snum A numeric variable to contain the value of the number of the %socko socket.
%socko A variable or an expression that is a reference to a Socket object.

Usage notes

  • After GetSocketNumber returns, the Socket object is no longer valid: it is null, and the socket is only accessible by the returned number. To access the socket as an object again, you use GetSocketObject.
  • If the object returned by a GetSocketObject invocation is the method object for a subsequent GetSocketNumber invocation, the NOCLOSE setting of the original numbered socket is applied to the numbered socket returned by GetSocketNumber. For information about NOCLOSE, see Set.