TWSocketServer
Main page -> ICS component reference -> TWSocketServer
Contents
Overview
unit | WSocketS.pas | |
inheritance | TWSocket |
TWSocketServer will normally be used to listen on a given tcp port. When a client connect, it will instanciate a new TWSocketClient component to handle communication with client. Normally you will derive your own component from TWSocketClient to add private data and methods to handle your processing needs. You tell TWSocketServer which component class it has to instanciate using ClientClass property. You have to initialize each instances created to handle each client from OnClientConnect event handler. TWSocketServer maintain a list of connected clients. You can access it using Client[] indexed property. ClientCount property is the size of Client[] array.
Since it is derived from TWSocket, lots of properties and events are unused and not listed here. Properties and events that have a meaning in both server or client component are listed here.
Note that TWSocketServer is only usable for incoming TCP connections. Use TWSocket if you need use UDP.
Properties
Addr | The interface to listen on. | |
Banner | ||
BannerTooBusy | ||
Client | ||
ClientClass | ||
ClientCount | ||
Handle | ||
HSocket | ||
LastError | ||
ListenBacklog | ||
MaxClients | ||
Port | ||
PortNum | ||
Proto | ||
State | Align test |
Methods
Abort | Align test | |
Close | ||
CloseDelayed | ||
Create | ||
Destroy | ||
IsClient | ||
Listen | ||
MessageLoop | ||
MessagePump | ||
ProcessMessage | ||
ProcessMessages | ||
Release | ||
ThreadAttach | ||
ThreadDetach | Align test |
Events
OnBgException | Align test | |
OnChangeState | ||
OnClientConnect | ||
OnClientCreate | ||
OnClientDisconnect | ||
OnError | ||
OnMessagePump |
How to