Difference between revisions of "TWSocket.State"

From Overbyte
Jump to navigation Jump to search
(Added best practices)
(Added navigation)
Line 1: Line 1:
 +
[[Main_Page | Main page]] -> [[ICS_Components_Reference | ICS component reference]] -> [[TWSocket]] -> [[TWSocket.State | State]]
 +
 
== Definition ==
 
== Definition ==
  

Revision as of 06:45, 9 July 2011

Main page -> ICS component reference -> TWSocket -> State

Definition

property State: TSocketState;

Descripton

State defines the current state of the socket, mainly used for log or display purposes.. The following values are available:

  • wsInvalidState
  • wsOpened
  • wsBound
  • wsConnecting
  • wsSocksConnected
  • wsConnected
  • wsAccepting
  • wsListening
  • wsClosed

Best practices

The State property is intended for display or logging purpose only. To manage your application flow/state, use the events instead. The most usefull events are OnSessionConnected, OnSessionAvailable, OnSessionClosed and OnDataAvailable.