Use TWSocketServer to act as a server. TWSocketServer will create a new
TWSocket for each connecting client to handle the client connection. From
that client connection, you can instaniate a new TWSocket to connect to
TWSocketServer can instanciate your own TWSocket derived component see
ClientClass property and see the examples provided with ICS. Then feel free
to ask for more question.
----- Original Message -----
From: "Wesley Spadola" <[EMAIL PROTECTED]>
Sent: Sunday, July 24, 2005 7:28 AM
Subject: [twsocket] Acting as Server/Client
>I am creating a program that acts as both a server and a client. It
> will connect to other instances of itself running on other computers as
> well as listen for other connections.
> I was wondering if it is possible to have one TWSocket component,
> derived from another TWSocket class but essentially has methods that
> will be able to handle clients (eg Listen etc) as well as act as a
> client itself (eg Connect etc).
> TCustomWSocket looks close, but obviously lacks the OnClientConnect and
> Clients[x] etc that would let me code server side routines easily.
> I would like to do this to prevent myself from writing two separate
> components, but especially having to write two potentially large
> OnDataAvailable handlers.
> Is such a capability available? What would I have to do?
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be