?here my code so fare

http://projects.psd-designs.com/servercode.txt

so you can see what am trying to do basically all I want is a custom vcl based on the serversocket so that am able to add my own options with out effecting overbyte source.

-----Original Message----- From: Arno Garrels
Sent: Tuesday, November 30, 2010 1:59 PM
To: ICS support mailing
Subject: Re: [twsocket] problem making a custom wrapper/vcl from overbyteserversocket.

si...@psd-designs.com wrote:
?I have a small problem I made a vcl wrapper of the overbyte client
socket so that I can add my custom data to it with out editing the
main overbyte source problem I have is when I try to build my app my
wrapper can not find the client[x].function for my add-ons because
right now it says my functions are undeclared when there in the
public section and work fine if I don't use client[x] functions below
is a example ...

[code]
 SocketServer.Client[i].Rank;
[/code]

[Pascal Error] mainserverunit.pas(407): E2003 Undeclared identifier:
'Rank'

so my question is how do I have the function so that I can use the
client[x] feature in my wrapper?

What do you call a VCL wrapper? You should derive your own class
from TWSocketClient as shown the (OverbyteIcs)TcpSrv demo.
Don't forget to tell the server the new client class:
WSocketServer1.ClientClass := TMyTcpSrvClient;
After that is done you have to cast the client objects explicitly
like (SocketServer1.Client[i] as TMyTcpSrvClient).Rank or
TMyTcpSrvClient(SocketServer1.Client[i]).Rank.

--
Arno Garrels
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to