See
also object creation information - ClassID/ProgID
Overview | Reference
Overview
The SocketSelectHelper is an optional object. Its usage can be
completely skipped if you prefer working with flags and bit-wise
operations over the status code returned by the SocketStream.Select
method. However for scripter's convenience it provides a decoding
functionality. The Select method and the returned state values are
used mostly with non-blocking sockets, with blocking sockets (default
behavior of the SocketStream if the Blocking property has not been set
to False) this is rarely needed.
Typical usage pattern is:
Set NSMain = Server.CreateObject("newObjects.net.NSMain")
Set s = NSMain.NewSocket ' Somewhere in the code a socket stream has been created
' Some operations with it
' .......
' At certain moment you need to query the socket state
Set so = NSMain.NewSelectHelper
' And here the object can be used to query the state easily - for example:
If so.ReadyWrite Then
' Do something - for example this may mean the server socket is
' connected and you can send data now
Else
' Do something else - for example this may mean the socket is not yet
' ready for data transmission.
End If
Reference
|