Difference between revisions of "TWSocket.State"
Jump to navigation
Jump to search
(Added best practices) |
|||
Line 16: | Line 16: | ||
* wsListening | * wsListening | ||
* wsClosed | * 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 [[TWSocket.OnSessionConnected | OnSessionConnected]], [[TWSocket.OnSessionAvailable | OnSessionAvailable]], [[TWSocket.OnSessionClosed | OnSessionClosed]] and [[TWSocket.OnDataAvailable | OnDataAvailable]]. |
Revision as of 06:44, 9 July 2011
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.