[twsocket] TFtpCtrlSocket

Jose Angel jblagon@treelogic.com
Mon, 12 Jun 2000 18:16:34 +0200


This is a multi-part message in MIME format.

------=_NextPart_000_00B7_01BFD49A.5780E3A0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

    I am making a ftp server, when a client gets an archive the server =
first compress it and after sends it. I want that when many clients get =
at the same time the server  all of them. I think the best form to do =
that is to create a class derived from TFtpCtrlSocket who have the =
compress method implemented. The problem is that a put the next code:

    MyCliCtrlSocket=3Dnew TMyCliCtrlSocket(this);
    FtpServer1->ClientClass=3D(TMetaClass*)MyCliCtrlSocket;
   FtpServer1->Start();

    the constructor class TMyCliCtrlSocket is like this=20
    __fastcall TMyCliCtrlSocket::TMyCliCtrlSocket(TComponent =
*AOwner):TFtpCtrlSocket(AOwner)

but when a client connects I receive an Access Violation message. =
Anybody knows what=B4s the problem or has any other idea to implement =
the compress method without stop the server???

    Than kou very much

------=_NextPart_000_00B7_01BFD49A.5780E3A0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2014.210" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; I am making a ftp =
server, when a=20
client gets an archive the server first compress it and after sends it. =
I want=20
that when many clients get at the same time the server&nbsp; all of =
them. I=20
think the best form to do that is to create a class derived from =
TFtpCtrlSocket=20
who have the compress method implemented. The problem is that a put the =
next=20
code:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
MyCliCtrlSocket=3Dnew=20
TMyCliCtrlSocket(this);<BR>&nbsp;&nbsp;&nbsp;&nbsp;FtpServer1-&gt;ClientC=
lass=3D(TMetaClass*)MyCliCtrlSocket;<BR>&nbsp;&nbsp;&nbsp;FtpServer1-&gt;=
Start();</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; the constructor =
class=20
TMyCliCtrlSocket is like this </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; __fastcall=20
TMyCliCtrlSocket::TMyCliCtrlSocket(TComponent=20
*AOwner):TFtpCtrlSocket(AOwner)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>but when a client connects I receive an =
Access=20
Violation message. Anybody knows what=B4s the problem or has any other =
idea to=20
implement the compress method without stop the server???</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; Than kou very=20
much</FONT></DIV></BODY></HTML>

------=_NextPart_000_00B7_01BFD49A.5780E3A0--