[twsocket] TWSocket.Dup() ?

2006-01-06 Thread Michael Preslar
I have my main form which has a TWSocket.. All is well. Now, I'd like to 
add another form (visibility can be toggled on or off .. and in truth, 
its just a little chat window)..

I'm thinking that I need to replicate the TWSocket from the main form 
onto the chat form, so my charform.sendbutton.onclick() can 
chatform.socket.sendstr(inputbox.text);

Is this the right way to go? If so, whats the better way to make this work?
-- 
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


Re: [twsocket] FtpServer - When to send a file?

2006-01-06 Thread Michael Preslar

Ya know. It'd help if I actually paid attention to ftpsrv.pas .. Took a 
bit of reading, but gained a (limited) understanding of the component. 
In the end, I answered my own question: The server handles it all by 
itself. Just make sure that:

1) FtpClient1.HostDirName and FtpClient1.HostFileName are correct
2) Either A) FtpServer1.DelayedSend := false _OR_ B) FtpClient1.Timeout 
is relatively high
3) Don't throw in the thread stuff if you're not going to use it.

Yeah. Simple stuff. And it took me half a day to figure it out. Doh!

Michael Preslar wrote:
> I'm having trouble figuring out where to put the "Send file" bit of an 
> ftpserv component, and once that part is figured out, the best way to 
> send the file data.
-- 
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


[twsocket] FtpServer - When to send a file?

2006-01-06 Thread Michael Preslar
I'm having trouble figuring out where to put the "Send file" bit of an 
ftpserv component, and once that part is figured out, the best way to 
send the file data.

In one program, I have an FtpClient component..

GetFiles : array[1..10] of string;

GetFiles[1] := 'michael.dat';
(and so on)

then


FtpClient1.(all sorts of settings)

then I cheat (Francois probably won't like this bit)

if FtpClient1.open then
   if FtpClient1.User then
  if FtpClient1.Pass then
  begin
for i := 1 to 10 do
begin
  (re-set all of the FtpClient1.properties like FtpTst1's
   ExecuteCmd() does )

  FtpClient1.HostFileName := GetFiles[i];

  if FtpClient1.get then
 memo1.lines.add('Downloaded '+GetFiles[i]);
  else
 memo1.lines.add('Cant download '+GetFiles[i]);

end;
  end;



Okay! Now on to the FtpServer..

Judging by the example (FtpServ1.pas) .. The best place to send the file 
is in the OnRetrSessionConnected event.. Here's what I tried to do, but 
found that it didnt work

var fil : file of byte;
 buf : array[1..2048] of byte;
 rec : integer;

(assign the datastream)..

assignfile(fil,client.FileName);
reset(fil);

repeat

application.processmessages;

blockread(fil,buf,sizeof(buf),rec);

if rec > 0 then
  Client.DataStream.Write(Buf[1], sizeof(Buf));

until (rec=0) or (application.terminated);

closefile(fil);

Client.DataStream.Seek(0, 0);



And thatd be it. I get zero bytes transferred, and the ftp server itself 
locks up..

What's the better way to do this?
-- 
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


[twsocket] DNSQuery BUG...

2006-01-06 Thread Ja
Ok. I've managed to make my project to check the list of domains for 
hosts but i've noticed that there is something wrong with DNSQuery 
component. With some nameservers (like those of my provider) 
DNSQuery sometimes doesnt get any answer... and although firewall 
(and netstat) after some time takes connection as closed, DNSQuery 
still doesn't start OnRequestDone event...

-- 
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


Re: [twsocket] ThttpCil Send bufsize problem

2006-01-06 Thread Francois PIETTE

Q1:
I set HttpCli1->CtrlSocket->BufSize=32768
,but when I send data it only has Max BufSize 8193.
How can I set it more than 8193 and has it Max limit?


Sending buffer size doesn't change much at the network layer. HTTP use TCP 
and TCP is a stream oriented proptocol. Default buffer size fit the largest 
TCP packet on Ethernet network.



Q2:
Dose HttpCli1->SendStream has Size limit?
When I send more than 100MB file, It seems not works.


Actually it works :-)
When you say "it doesn't work", I can't help you. You must give more details 
about what doesn't work. You must given error message or symptoms.


--
[EMAIL PROTECTED]
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

Re: [twsocket] TDNSQuery problem...

2006-01-06 Thread Francois PIETTE
> But when im putting in RequestDone:
> TDNSQuery(sender).Destroy; access violation occures. Why is that?

You can't destroy the object while in OnRequestDone event handler.
But you can PostMessage a custome message to your form and from the event 
handler destroy the object.
(This is implemented in some of ICS component as the Release method, but I 
don't think I've done that for TDnsQuery).

--
Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
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


Re: [twsocket] ICS-beta V5 and V6 have been updated

2006-01-06 Thread Francois PIETTE
>> ICS-beta V5 and V6 have been updated
> 
> V5 is OK, but it looks like the V6 zip is from 2 Jan.  

Right.
Corrected now.
Sorry.
--
[EMAIL PROTECTED]
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


Re: [twsocket] Client and Server at same time?

2006-01-06 Thread Michael Preslar
Can't remember. I've since moved on, seperating the client and server, 
and have now run into a new issue that I'll post about soon (this new 
issue is probably something very easy for those that are used to ICS)

Wilfried Mestdagh wrote:
> Hello Michael,
> 
> I dont see in your example that you assign an event handler to
> OnSessionAvaialble, so I dont think TriggerSessionAvailable will cause
> an exception. But what is exacly the error ?
> 
> ---
> Rgds, Wilfried [TeamICS]
> http://www.overbyte.be/eng/overbyte/teamics.html
> http://www.mestdagh.biz
> 
> Thursday, January 5, 2006, 03:33, Michael Preslar wrote:
> 
>> Good catch.
> 
>> Now it crashes in WSocket.pas at the "end;" of procedure 
>> TCustomWSocket.TriggerSessionAvailable(Error : Word);

-- 
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


[twsocket] ThttpCil Send bufsize problem

2006-01-06 Thread Opqrst Ghrst
Q1:
I set HttpCli1->CtrlSocket->BufSize=32768
,but when I send data it only has Max BufSize 8193.
How can I set it more than 8193 and has it Max limit?
Q2:
Dose HttpCli1->SendStream has Size limit? 
When I send more than 100MB file, It seems not works.

___
 YM - 離線訊息
 就算你沒有上網,你的朋友仍可以留下訊息給你,當你上網時就能立即看到,任何說話都冇走失。
 http://messenger.yahoo.com.hk
-- 
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

Re: [twsocket] TDNSQuery problem...

2006-01-06 Thread Guillaume MAISON
Ja a écrit :
> But when im putting in RequestDone:
> TDNSQuery(sender).Destroy; access violation occures. Why is that?

instead try :
TDNSQuery(sender).Free;

But if i were you i would do it elsewhere...
Even in requestdone events or within any component event you shouldn't 
try to destroy it as it may be used after the event call...

-- 

Guillaume MAISON - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com

-- 
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


Re: [twsocket] TDNSQuery problem...

2006-01-06 Thread Fastream Technologies
Hello,

Did you try this:

TDNSQuery(sender).Release; ?

Regards,

SZ

- Original Message - 
From: "Ja" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Friday, January 06, 2006 1:17 PM
Subject: [twsocket] TDNSQuery problem...


> Hi.
> I'm trying to make application that could get information about 
> hosts simultanously for lets say... 10 hosts... I made something 
> like this:
> 
> -
> 
> var newsocket:TDnsQuery;
>domain:string;
> 
> begin
>  newsocket:=TDNSQuery.Create(self);
>  newsocket.Addr:='195.117.102.3';
>  newsocket.Proto:='tcp';
>  newsocket.Port:='53';
>  newsocket.OnRequestDone:=DnsQuery1RequestDone;
>  readln(plik,domain);
>  newsocket.ALookup(domain);
> end;
> 
> end;
> 
> --
> 
> But when im putting in RequestDone:
> TDNSQuery(sender).Destroy; access violation occures. Why is that?
> 
> Thank you for your help!
> Ann.
> 
> 
> 
> -- 
> 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


[twsocket] TDNSQuery problem...

2006-01-06 Thread Ja
Hi.
I'm trying to make application that could get information about 
hosts simultanously for lets say... 10 hosts... I made something 
like this:

-

var newsocket:TDnsQuery;
domain:string;

begin
  newsocket:=TDNSQuery.Create(self);
  newsocket.Addr:='195.117.102.3';
  newsocket.Proto:='tcp';
  newsocket.Port:='53';
  newsocket.OnRequestDone:=DnsQuery1RequestDone;
  readln(plik,domain);
  newsocket.ALookup(domain);
 end;

end;

--

But when im putting in RequestDone:
TDNSQuery(sender).Destroy; access violation occures. Why is that?

Thank you for your help!
Ann.



-- 
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


Re: [twsocket] ICS-beta V5 and V6 have been updated

2006-01-06 Thread Angus Robertson - Magenta Systems Ltd
> ICS-beta V5 and V6 have been updated

V5 is OK, but it looks like the V6 zip is from 2 Jan.  

Angus
-- 
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