Re: [twsocket] THttpConnection throttling problem with timer

2006-01-30 Thread Wilfried Mestdagh
Hello Fastream,

You have to call the message pump from in your thread's execute method.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Monday, January 30, 2006, 08:09, Fastream Technologies wrote:

 Hello Wilfried,

 I am using noforms and multithreaded and for some reason the messagepump is
 never called! Can we assume this as normal since I am using async methods
 only?

 Regards,

 SZ

 - Original Message - 
 From: Fastream Technologies [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Sunday, January 29, 2006 7:45 PM
 Subject: Re: [twsocket] THttpConnection throttling problem with timer


 Hello Wilfried,

 I do not think that's the problem. The code is:

 void __fastcall httpClient::MessagePump(TObject *Sender)
 {
httpServerClient-affinityThread-messagePump();
 }
 //---

 and it calls a GetMessage() based loop which is good.

 Regards,

 SZ

 - Original Message - 
 From: Wilfried Mestdagh [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Sunday, January 29, 2006 6:59 PM
 Subject: Re: [twsocket] THttpConnection throttling problem with timer


 Hello Fastream,

 FCtrlSocket-OnMessagePump = MessagePump;

 This was in fact the answer to my question. But what do you have written
 in MessagePump ? If it is the MessagePump method from TWSocket you are
 in an endless loop because MessagePump will call OnMessagePump if it is
 assigned.

 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz

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


-- 
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] THttpConnection throttling problem with timer

2006-01-30 Thread Wilfried Mestdagh
Hello Fastream,

OK. You mentioned before that it was TryToSend that was continuously
called. So when it happens, set a break over there, then check via call
stack who the caller is, and you can probably find out setting a break
at higher level. Does that make sence ?

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Monday, January 30, 2006, 09:51, Fastream Technologies wrote:

 That's already what I did. However it still consumes 100% CPU!!!

 Regards,

 SZ

 - Original Message - 
 From: Wilfried Mestdagh [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Monday, January 30, 2006 10:49 AM
 Subject: Re: [twsocket] THttpConnection throttling problem with timer


 Hello Fastream,

 You have to call the message pump from in your thread's execute method.

 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz

 Monday, January 30, 2006, 08:09, Fastream Technologies wrote:

 Hello Wilfried,

 I am using noforms and multithreaded and for some reason the messagepump
 is
 never called! Can we assume this as normal since I am using async methods
 only?

 Regards,

 SZ

 - Original Message - 
 From: Fastream Technologies [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Sunday, January 29, 2006 7:45 PM
 Subject: Re: [twsocket] THttpConnection throttling problem with timer


 Hello Wilfried,

 I do not think that's the problem. The code is:

 void __fastcall httpClient::MessagePump(TObject *Sender)
 {
httpServerClient-affinityThread-messagePump();
 }
 //---

 and it calls a GetMessage() based loop which is good.

 Regards,

 SZ

 - Original Message - 
 From: Wilfried Mestdagh [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Sunday, January 29, 2006 6:59 PM
 Subject: Re: [twsocket] THttpConnection throttling problem with timer


 Hello Fastream,

 FCtrlSocket-OnMessagePump = MessagePump;

 This was in fact the answer to my question. But what do you have 
 written
 in MessagePump ? If it is the MessagePump method from TWSocket you are
 in an endless loop because MessagePump will call OnMessagePump if it is
 assigned.

 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz

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


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


Re: [twsocket] THttpConnection throttling problem with timer

2006-01-29 Thread Wilfried Mestdagh
Hello Fastream,

 FCtrlSocket-OnMessagePump = MessagePump;

This was in fact the answer to my question. But what do you have written
in MessagePump ? If it is the MessagePump method from TWSocket you are
in an endless loop because MessagePump will call OnMessagePump if it is
assigned.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
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] THttpConnection throttling problem with timer

2006-01-29 Thread Wilfried Mestdagh
Hello Fastream,

OK, I was just brainstorming of course :) Yes GetMessage is OK.

Can you not pauze the IDE to see where it is looping ? 100% CPU could be
a loop somewhere. You probably comes into a CPU window, but stepping
trough it you should come back on some C or Delphi code.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Sunday, January 29, 2006, 18:45, Fastream Technologies wrote:

 Hello Wilfried,

 I do not think that's the problem. The code is:

 void __fastcall httpClient::MessagePump(TObject *Sender)
 {
 httpServerClient-affinityThread-messagePump();
 }
 //---

 and it calls a GetMessage() based loop which is good.

 Regards,

 SZ

 - Original Message - 
 From: Wilfried Mestdagh [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Sunday, January 29, 2006 6:59 PM
 Subject: Re: [twsocket] THttpConnection throttling problem with timer


 Hello Fastream,

 FCtrlSocket-OnMessagePump = MessagePump;

 This was in fact the answer to my question. But what do you have written
 in MessagePump ? If it is the MessagePump method from TWSocket you are
 in an endless loop because MessagePump will call OnMessagePump if it is
 assigned.

 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz

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


Re: [twsocket] GpHTTPProxy and remote address info

2006-01-27 Thread Wilfried Mestdagh
Hello ibrahim,

You can use GetPeerAddr method from TWSocket.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Friday, January 27, 2006, 10:28, ibrahim bulut wrote:

 hi,
 i am trying to use GpHTTPProxy component

 how can i get the remote address and remote port from GpHTTPProxy on 
 clientdataavailable event and remotedataavailable event


 ibrahim Bulut
 iletişim Online Ltd.Şti.
 Software and Database Expert
 Turkish Republic

-- 
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 website down?

2006-01-27 Thread Wilfried Mestdagh
Hello Arno,

 145-236-183-194.adsl.perceval.be [194.183.236.145]

Here it stop also at same hop.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
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] Port Access

2006-01-24 Thread Wilfried Mestdagh
Hello David,

The port is in use because the server listens on that port already,
otherwise the client could not send it to that server. You can make the
server listen on another port and then your application should act like
a proxy intercepting all data. See SocketSpy or gpHttpProxy for example.

you can of course set the client to connect on other port and do the
same.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Tuesday, January 24, 2006, 11:16, David Lewis wrote:

 Hi,

 I have a client service that connects and gathers data and then throws
 this data out in a stream on port 60500. This client is 3rd party and I
 cannot alter it. However, it is known to be working product.

 What I need to be able to do is connect to that stream stream of data on
 port 60500, and then decode and process it.

 I've tried just throwing together a quick test program, using a single
 TWSocket, with settings:
 co_IcsSocket-Addr = 0.0.0.0;
 co_IcsSocket-Port = 60500;
 co_IcsSocket-Listen( );

 But that throws:

 Project PortMonitor.exe raised exception class eSocketException with 
 message 'Error 10048 in function Bind Address already in use'

 Now, I am presuming that the 'already in use' bit, means that the client
 service already has access to this port.

 What should I be doing differently to be able to gather this stream of
 data?

 Dave


-- 
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] OnDataAvailable called before shutdown with no data

2006-01-22 Thread Wilfried Mestdagh
Hello Jack,

 if there is data available but do not want to actually remove
 the data from twsocket's buffer. This is because I want to

You can use Pauze / Resume but there is also a very simple way to do it,
just set wsoNoReceiveLoop in SocketOptions to True and dont Receive in
OnDataAvailable, just Exit.

At that point OnDataAvailable will not fire again.

Later when you wants to receive again, just call Receive outside
OnDataAvailable.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
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] OnDataAvailable called before shutdown with no data

2006-01-22 Thread Wilfried Mestdagh
Hello Jack,

 It suppress async notification. So you don't receive events anymore but I/O
 continue as much as winsock can, for example filling his receive buffer.

 Got it. Wouldn't this be similar to ignoring OnDataAvailable event
 and is vulnerable to DOS attack?

If you call Pauze then winsock will stay receiving until his buffer is
full. Default value is 8 KB. Later when you wants to receive again and
call Resume all is back to normal. DOS attac will only grow until
winsock buffer is full so not a big deal (8 KB).

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
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] TWSocket sending UDP

2006-01-21 Thread Wilfried Mestdagh
Hello Shane,

You need to call Connect. However you do not have to wait and you can
call SendTo immediatly after calling Connect.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Saturday, January 21, 2006, 05:08, Shane Mitchell wrote:

 Hey.

 I'm trying to use TWSocket to send UDP messages to many different
 hosts.  I want to create the TWSocket dynamically, and I don't want to
 have to use Connect/Close every time I send a UDP message.  I thought
 I could use the SendTo() procedure to do this, but I have had no
 success.  This is my test code to send one UDP message to myself (it
 doesn't work):

 procedure Test();
 var
   DestAddr: TSockAddr;
   Data: string;
 begin
   SocketOut := TWSocket.Create(nil); // create the socket
   SocketOut.Proto := 'udp'; // set it to use UDP (shouldnt really need this)
   ZeroMemory(@DestAddr, SizeOf(DestAddr)); // clear the address
   DestAddr.sin_family := AF_INET; // we have to use AF_INET
   DestAddr.sin_port := 600; // set the port to 600
   DestAddr.sin_addr.S_addr := WSocket_inet_addr('127.0.0.1'); // point to self
   Data := 'Hello world'; // the message we want to send
   SocketOut.SendTo(DestAddr, SizeOf(DestAddr), @Data[1], Length(Data)); // 
 send
   // nb: SocketOut is freed later
 end;

 Could anyone point out to me what I'm doing wrong.  :)

 Thanks
 - Shane

-- 
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] GpHTTPProxy component

2006-01-21 Thread Wilfried Mestdagh
Hello ibrahim,

You have to set the proxy settings of your browser to the host name or
IP where you run gpHttpProxy on. When it is on the same machine you use
localhost or 127.0.0.1.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Saturday, January 21, 2006, 12:19, ibrahim bulut wrote:


 hi,
 i have to write a http sniff application
 i must capture internet explorer data.

 i have download and installed the component. (icsbeta20060108.zip)
 but i can not capture the data

 i am trying demo application
 i input www.google.com.tr to address editbox.
 but i can not see the data 

 what is the problem

 i am a new with this component

 please help me

 thanks a lot

-- 
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] TGpHTTPProxy and Banner in footer

2006-01-21 Thread Wilfried Mestdagh
Hello scanctrl,

 Ok, howto place my code to analyze the HTML ?
 and how to make to send my additional string to browser ?

GpHttpProxy has somewhere a parser (to parse the GET's). At some point
you can expand the code to search for /body. At that point you can
send your data.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
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] GpHTTPProxy component

2006-01-21 Thread Wilfried Mestdagh
Hello ibrahim,

If you wants to sniff raw traffic then (as SZ suggested) then you can
use Angus his components:
http://www.magsys.co.uk/download/software/monsock1.zip but if you want
to sniff only HTTP traffic from within a given LAN then the proxy can be
preferable.

Some browser has separate settings for dialup / lan / ... so it could be
you set proxy in wrong field ?

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Saturday, January 21, 2006, 14:44, ibrahim bulut wrote:


 when i set the ie browser proxy to localhost, i cannot reach the internet.
 i am working on a local network (adsl)

 what i must do
 is there another way to do it without proxy


 - Original Message - 
 From: Wilfried Mestdagh [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Saturday, January 21, 2006 3:12 PM
 Subject: Re: [twsocket] GpHTTPProxy component


 Hello ibrahim,
 
 You have to set the proxy settings of your browser to the host name or
 IP where you run gpHttpProxy on. When it is on the same machine you use
 localhost or 127.0.0.1.
 
 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz
 
 Saturday, January 21, 2006, 12:19, ibrahim bulut wrote:
 
 
 hi,
 i have to write a http sniff application
 i must capture internet explorer data.
 
 i have download and installed the component. (icsbeta20060108.zip)
 but i can not capture the data
 
 i am trying demo application
 i input www.google.com.tr to address editbox.
 but i can not see the data 
 
 what is the problem
 
 i am a new with this component
 
 please help me
 
 thanks a lot
 
 -- 
 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
 
 __ NOD32 1.1373 (20060120) Information __
 
 This message was checked by NOD32 antivirus system.
 http://www.eset.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] HttpCli + Timeout How To??

2006-01-20 Thread Wilfried Mestdagh
Hello Mac,

   How i implement a timeout control in HttpCli...

Use async call's and a timer. when timer expires call abort, when request
is done disable timer.

   I using HttpCli in sync mode, because i need to run it in Thread..

You can use async mode in a thread as well. There is no difference, just
call HttpCli.Socket.ProcessMessages in the Execute method. Nothing more
to do.

   How i cancel httpcli get/post command? after started?

Abort;

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
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] [re] databuffer is cut off

2006-01-19 Thread Wilfried Mestdagh
Hello Albert,

 Display(IntToStr(SendStr(Encrypt(AnswerData.CommaText) + #13#10))+'bytes 
 sent');
 CloseDelayed;

There could be 2 problems here. The first is Close already mentioned by
Arno, and the other is Encrypt. Are you sure #13#10 will be never in
your encrypted string ?

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
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] using Api form with message loop

2006-01-19 Thread Wilfried Mestdagh
Hello Paul,

Yes look at the examples. One of them (sorry forgot the name) create a
form on the fly. But you can do same without form whitch will save
probably some more memory. Create a class, create the ICS component you
wants (whitch will create a hidden window), and execute the message pump
from the TWSocket it uses :)

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Thursday, January 19, 2006, 20:39, Paul wrote:

 is it possible to create a form with a message loop with api
 and still use the http async methods ?

 This will shrink the total application size with almost 300K



 Paul

-- 
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] HTTP POST - SendStream With TMemoryStream

2006-01-19 Thread Wilfried Mestdagh
Hello,

I have started a new thread for this, because this one is a reply of
Sending 7 Kilobytes of data whitch I was interested to follow and this
one is not my 100% interest or knowledge. Please answer to the new
thread only.

Many modern email readers can sort on thread whitch is very nice, so
please if you do not have such email reader try to respect this :)

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Thursday, January 19, 2006, 21:22, Dan wrote:

 Derive your own stream, probably best to be from TFilestream, but add a
 header property or something.  Then override the seek and read methods (I
 think) to either seek into the file or into your header, and to read 
 appropriate data.

 Dan

 - Original Message - 
 From: Opqrst Ghrst [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Thursday, January 19, 2006 7:16 PM
 Subject: 回覆: Re: [twsocket] HTTP POST - SendStream With TMemoryStream


 thanks F.P.

 I See,
 but if the file is more than 1 GB, That will cost my
 too mush disk free space,I am confuse on this problem,
 because I must add Form Field Value information on the
 Head of the data and boundary end of data.it will be
 work by ContentTypePost=multipart/form-data mothod
 post.

 --- Francois PIETTE [EMAIL PROTECTED] 說:

  when I use Http Post Web to send file,
  if the file is bigger as 100mb.
  because content must has some FormField to post,
  I use MemorrStream write these information and
  FileStream.
  when I load to TMemoryStream it will cause my
 computer
  slow to build MemoryStream, can I use other
 mothods to
  resolve this problem?

 If you use TMemoryStream, then your 100MB of data is
 loaded onto RAM which
 can be slow. Use another kind of TStream, for
 example a TFileStream which
 store his data in a disk file instead of RAM.

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


 ___
  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

-- 
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] using Api form with message loop

2006-01-19 Thread Wilfried Mestdagh
Hello Paul,

I may be understeanding you wrong, but you dont need a form to
communicate with another program tru messages. You only need a form if
you wants to have windows controls on it like buttons, memos etc..

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Thursday, January 19, 2006, 21:35, Paul wrote:

 Hi Wilfried,

 that sounds like the console mode programs.
 I need to create a form myself, because it has to communicate 
 with another program thru messages.


 Paul

 - Original Message - 
 From: Wilfried Mestdagh [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Thursday, January 19, 2006 9:31 PM
 Subject: Re: [twsocket] using Api form with message loop


 Hello Paul,
 
 Yes look at the examples. One of them (sorry forgot the name) create a
 form on the fly. But you can do same without form whitch will save
 probably some more memory. Create a class, create the ICS component you
 wants (whitch will create a hidden window), and execute the message pump
 from the TWSocket it uses :)
 
 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz
 
 Thursday, January 19, 2006, 20:39, Paul wrote:
 
 is it possible to create a form with a message loop with api
 and still use the http async methods ?
 
 This will shrink the total application size with almost 300K
 
 
 
 Paul
 
 -- 
 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


Re: [twsocket] using Api form with message loop

2006-01-19 Thread Wilfried Mestdagh
Hello Paul,

 You can't post a message to a program without a form

Yes you can. The addresee only have to have a (hidden) window.

 To post or send a mesaage, you always need a handle to
 post the message

Yes but the handle can be a (hidden) window. Not nececarly a TForm.
Probably we are talking the same :)

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
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] [re] databuffer is cut off

2006-01-19 Thread Wilfried Mestdagh
Hello albert,

thanks for feedback.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Thursday, January 19, 2006, 21:51, albert drent wrote:

 The CloseDelayed in the ondatasent was the solution THANKS!!! It's
 sooo logical I'm ashamed I didn't see that.

 The crlf in the encrypted data is taking care of, but you're right, this was 
 an isue.

 Thank you all again.

 Albert

-- 
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] fast data sending

2006-01-18 Thread Wilfried Mestdagh
Hello Fastream,

You can easely create thousands of TTimers, but you have to taken all
limits into account. From the moment you enable a TTimer a hidden window
is created. disabling the TTimer also destroy that window. So the window
is only there for a short time (while TTimer is running).

On the other hand you dont have to do it with TTimer. You can easy
create your own timer that does not need any window. See SetTimer in API
help.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Wednesday, January 18, 2006, 09:41, Fastream Technologies wrote:


 - Original Message - 
 From: Wilfried Mestdagh [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Wednesday, January 18, 2006 10:36 AM
 Subject: Re: [twsocket] fast data sending
 I dont mean TTimer, because that TTimers are limited recourse, also each
 Timer create a hidden window also limited. So in your case using TTimers
 will get you probably out of recourses.

 I asked a few days ago to Francois if the TTimer code of HttpCli could be
 used in THttpConnection (web server client connections) for thousands of
 clients and he said yes. Now you say it is not feasible just as I thought.
 Could you point me to some locations for reading about this? Is there a
 workaround for this problem?

 I need to throttle web connections with different speeds based on the 
 domain/folder/username they access. That's it. I use multiple connections
 per thread design.

 Regards,

 SubZero 


-- 
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] fast data sending

2006-01-18 Thread Wilfried Mestdagh
Hello Dod,

To be as correct as possible:

- TWSocket used no non-pagable memory, neahter does his buffers.
- Only Winsock does use it for the socket, for send and for receive.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
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] fast data sending

2006-01-18 Thread Wilfried Mestdagh
 I think the limit for handles is for window handles and the handles
 created by Winsock are not windows.

Yes this limit is the limit of windows. Not the limit of handles. Sure
somewhere there could be a limit of handles, but I espect this is only a
limit so high that we does not have that to taken into account.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
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] fast data sending

2006-01-18 Thread Wilfried Mestdagh
Hello,

 Each throttler requires a different interval. Perhaps a timer of 1ms
 interval can cover all?

I dont know the limit of windows timers, but indeed 1 timer can cover
all timings. 1 ms is not realistic because of the time slice of winows.
Workstations OS has time slice of 13 ms or something and server version
(I recall) 25 ms. So seting timer 1..13 ms or 1..25 ms will do the same.

You can also make a timerthread with a message loop that does these
timings.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
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] fast data sending

2006-01-17 Thread Wilfried Mestdagh
Hello Dod,

 OK, I think I understand where I was wrong. So when I send data I
 simply do a .Send loop to each connected user and that all.

Yep, and Send will return immediatly while the ocmponent does the job in
background using coroporative multitasking.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
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] Bandwidth control TFtpClient

2006-01-17 Thread Wilfried Mestdagh
Hello Angus,

My opinion too, but it seems a popular item :) If I write an application
my concern is to get as muth data in short possible time. But others
seems to like to delay it :)  I dont know the reason...

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Tuesday, January 17, 2006, 21:39, Angus Robertson - Magenta Systems Ltd wrote:

 I dont think the control channel of FTP needs throttling, only data
 channel. 

 Who would possible want to throttle even the data channel on a FTP client?

 Just seems unnecessary complications to me. 

 I thought throttling was something servers did when they are hosted on
 lines incapable of meeting proper bandwidth for all users.  

 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


Re: [twsocket] Bandwidth control TFtpClient

2006-01-17 Thread Wilfried Mestdagh
Hello Paul,

   Yes understeand. I only never had that situation or ask. I probably
   have the kind of customars with different view.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Tuesday, January 17, 2006, 21:58, Paul wrote:

 Hi Wilfried,

 It is sometimes necessary.
 Suppose you have a server running on an 100 MB WAN-connection,
 and there are clients that have 100MB upload and download lines,
 your server will be blocked immediately.

 Such clients (mostly corparate companies) exist ,
 and even more then one would like.


 Paul



 - Original Message - 
 From: Wilfried Mestdagh [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Tuesday, January 17, 2006 9:51 PM
 Subject: Re: [twsocket] Bandwidth control TFtpClient


 Hello Angus,

 My opinion too, but it seems a popular item :) If I write an application
 my concern is to get as muth data in short possible time. But others
 seems to like to delay it :)  I dont know the reason...

 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz

 Tuesday, January 17, 2006, 21:39, Angus Robertson - Magenta Systems Ltd
 wrote:

 I dont think the control channel of FTP needs throttling, only data
 channel.

 Who would possible want to throttle even the data channel on a FTP 
 client?

 Just seems unnecessary complications to me.

 I thought throttling was something servers did when they are hosted on
 lines incapable of meeting proper bandwidth for all users.

 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

 


-- 
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] events firing in strange sequence TWSocket

2006-01-16 Thread Wilfried Mestdagh
Hello,

Have something very strange. At customar it is client program and they
connect via VPN over internet to server. What I dont know is if they
have obscure (software) firewalss who are messing up Winsock, so:

1/14/2006 11:25:58 PM OnSessionClosed with error: 10053
1/14/2006 11:25:58 PM Sending TCP packet// probably bug in my app
1/14/2006 11:25:58 PM OnSessionClosed with error: 10054
1/14/2006 11:25:58 PM OnDataSent

The wierd thing is that OnDataSent is fired hier above ! But I cannot
understeand wy 2 times a OnSessionClosed without a Connect in between.
Anyone ever saw this ?

The rest of the log is not reliable because by the OnSessionClosed, my
program do a retry to connect exact a few seconds later, but of course 2
times :)

--
Rgds, Wilfried
http://www.mestdagh.biz

-- 
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] wierd sequence in event firing of TWSocket

2006-01-16 Thread Wilfried Mestdagh
Hello,

Anyone ever seen this sequence ?

1/14/2006 11:25:58 PM OnDataSent
1/14/2006 11:25:58 PM OnSessionClosed with error: 10053
1/14/2006 11:25:58 PM Sending TCP packet 
1/14/2006 11:25:58 PM OnSessionClosed with error: 10054
1/14/2006 11:25:58 PM OnDataSent
1/14/2006 11:26:03 PM DNSLookup for ...

The 'Sending TCP packet' is for sure a bug in my application, but
OndataSent is fired !  Also I have 2 OnSessionClose !

There is only 1 socket in this application. It is developed in D7 and
TWSocket version is 5.16.

They have VPN connection troush internet, and the VPN is etablished by
the router, not the machine where app runs on. Waht I dont know is if
they have some kind of obscure (software) firewall on their machine,
because I have seen firewalls giving obscure winsock behaviour.

--
Rgds, Wilfried
http://www.mestdagh.biz

-- 
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] events firing in strange sequence TWSocket

2006-01-16 Thread Wilfried Mestdagh
Hello Arno,

 I think it is impossible that OnSessionClosed is fired twice, because
 it is always checked whether FCloseInvoked = FALSE.
 Isn't it possible that there are multiple instances?

I just ahve posted same message again, sorry for that (need some
coffee). No there is only 1 instance that is the strange thing. The
TWSocket is created in constructor and destroyed in destructor. Both are
only called in program startup and terminate. Very strange.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
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] wierd sequence in event firing of TWSocket

2006-01-16 Thread Wilfried Mestdagh
Hello Francois,

 Wierd sequence may be produced when you call the message pump from a socket 
 event.

No just found it. See my other mail. It is because my application was
sending a packet from IN the OnSessionClose.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
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: 回覆: Re: 回覆: Re: [twsocket] ThttpCil S end bufsize problem

2006-01-12 Thread Wilfried Mestdagh
Hello Opqrst,

 HttpCli1-CtrlSocket-BufSize property, and I don't
 know how to set can more than 8193 even to 32768 or

You can set this to any value (it's integer), but if you let it default
you will probably have best performance.

 Because by this way I can Upload with my full upload
 connect speed.

Changing the buffer size will not change upload speed. This because, as
Francois already have mentioned, ethernet packet size is 1514 bytes. If
you have PPP connection then packetsize is 512 bytes. This is low level
and nothing to do with ICS or any other components.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Wednesday, January 11, 2006, 21:56, Opqrst Ghrst wrote:


 Hi

 I want to change the send buffer  just like Tidhttp it
 property SendBufferSize , at ThttpCli I only change
 it to max 8193 limit by set
HttpCli1-CtrlSocket-BufSize property, and I don't
 know how to set can more than 8193 even to 32768 or
 more.
 Because by this way I can Upload with my full upload
 connect speed.
 Dose ThttpCli has just like this property to set?

 sorry for my poor english.

 --- Francois PIETTE [EMAIL PROTECTED] 說:

  I try use TIdhttp it can send with packet 32768
 size.
 
 That is not possible. Maximum packet size is 1514
 bytes on Ethernet it is 
 much less on modem links. You probably confuse the
 maximum buffer size you 
 may send and the packet size on the network. Totally
 different things.
 
 THttpCli can send any data size. You don't have to
 worry about winsock 
 buffer size.
 
  But when I use this Object and HttpCli at the same
  time I cannot complier. It seems these two object
  cannot use the same time.
 
 Strange. But easy solution: use only THttpCli !
 I can't help you more if you don't tell the error
 message you get. The 
 compiler always give error messages which give an
 incredible help to solve 
 problems. Seems you are neglecting those messages
 :-(
 
 --
 [EMAIL PROTECTED]
 http://www.overbyte.be
 
 
 - Original Message - 
 From: Opqrst Ghrst [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Tuesday, January 10, 2006 8:42 AM
 Subject: 回覆: Re: [twsocket] ThttpCil Send bufsize
 problem
 
 
 
  Thanks for your reply.
  I try use TIdhttp it can send with packet 32768
 size.
  But when I use this Object and HttpCli at the same
  time I cannot complier. It seems these two object
  cannot use the same time.
 
  --- Francois PIETTE [EMAIL PROTECTED]
 說:
 
   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


 ___
  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] how to send an Image ?

2006-01-10 Thread Wilfried Mestdagh
Hello Persian,

   I have an question , have I size limite on wsocket ?

The only limit is if you wants to send packets larger than ethernet MTU
witch is also the size of TWSocket's send buffer. As far as I know you
only have to do it in the sending program.

Note that if you sent packets larger than MTU then the network layer
will split it into smaller packets and the receiver will reassemble it.
But if 1 of the smaller packets is lost or corrupted all packets will be
dropped. So this is probably not very wise thing to do, so better is to
send packets that will not be split.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Tuesday, January 10, 2006, 15:14, Persian Patient wrote:

 Dear Friends ,
   
   I have to send an Image from client side to server side I am
 using UDP protocol , I have to use WSocket in server and client .
   
   I have an question , have I size limite on wsocket ?
   
   Best Regards,
   Persian Patient .
   


 -
 Yahoo! Photos
  Ring in the New Year with Photo Calendars. Add photos, events, holidays, 
 whatever.

-- 
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] IP to host

2006-01-10 Thread Wilfried Mestdagh
Hello Ann,

Use ReverseDnsLookup method. OnDnsLookupDone will then fire with the
hostname in DnsResult.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Tuesday, January 10, 2006, 15:46, Ja wrote:

 Hi.
 How do i change IP to host (domain) ??
 Thanx!
 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] how to send an Image ?

2006-01-10 Thread Wilfried Mestdagh
Hello Persian,

Please tell how that you send the data ?
You mention 30 KB, and you mention UDP. Do you send it in several
packets, and do you number the packets ? Because UDP is not reliable you
may have receive the packets in wrong order, or duplicate ones or
missing ones. Using UDP you have to take all this into account.

   and another question is how can I send large files using ICS ?

Nothing special to do. Is your queston also realted to UDP, or do you
want to use TCP ?

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Tuesday, January 10, 2006, 17:11, Persian Patient wrote:

 Dear Sir ,
   
   I have to send an Image that has about 30 KBytes of size and my
 network is 100MB lan , but when I tried to send an image that has 2
 Kbytes of size in server side I received the image but this image can
 not be show correctly . its looking that the server can not receive
 the image correctly . how to fix this problem ?
   
   and another question is how can I send large files using ICS ?
   
   Best Regards,
   Persian Patient .


 -
 Yahoo! Photos – Showcase holiday pictures in hardcover
  Photo Books. You design it and we’ll bind it!

-- 
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] DNSQuery BUG...

2006-01-08 Thread Wilfried Mestdagh
Hello Ann,

 But I've set protocol to TCP...

There is no proto property in DNSQuery component.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
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] TWSocket.Dup() ?

2006-01-07 Thread Wilfried Mestdagh
Hello Michael,

You dont need to replicate it. Just leave the Socket where it is. In
your second form you can have a socket that points to the other socket.
Dont drop one on the second form, but just (I called the socket Cli):

SecondForm.Cli := MainForm.Cli;

and then you call all in the Cli of the second form witch points to the
Cli of the mail form.

An object variable is just a pointer to the actual object, so you can as
many pointers to the same object as you wants.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Saturday, January 7, 2006, 00:58, Michael Preslar wrote:

 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] DNSQuery BUG...

2006-01-07 Thread Wilfried Mestdagh
Hello Ann,

 still doesn't start OnRequestDone event...

Could be that it is waiting... To have a short timeout you can
eventually set your own timeout timer.

Please start next time a new subject instead of reply to another one and
change the subject line. You do that every time and your message will
not be seen by many people.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Friday, January 6, 2006, 20:44, Ja wrote:

 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] WSocket DNSLookup.

2006-01-05 Thread Wilfried Mestdagh
Hello Ja,

 Program check list of domains with several components at once...
 putting something in woudldnt do the job.

Yes it does (not tested):

procedure TForm1.LookupBtnClick(Sender: TObject);
var
  Sock: TWSocket;
  n: integer;
bgein
  n := 0;
  while n  DomainList.Count do begin
Sock := TWSocket.Create(nil);
Sock.OnDnsLookupDone := SockDnsLookupDone;
Sock.Addr := DomainList[n];
Sock.DnsLookup(Sock.Addr);
Inc(n);
  end;
end;

procedure SockDnsLookupDone(Sender: TObject; Error: Word);
var
  Sock: TWSocket;
begin
  Sock := TWSocket(Sender);
  if ErrCode = 0 then
Memo1.Lines.AddStrings(Sock.DnsResultList + ' ' + Sock.Addr)
  else
Memo1.Lines.Add('Error ' + Sock.Addr + ' ' + WSocketErrorDesc(ErrCode))
  Sock.Release;
end;

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
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] WSocket DNSLookup.

2006-01-04 Thread Wilfried Mestdagh
Hello Ja,

 But dont know how to get the domain_name that just have been looked
 up. TWSocket(Sender).addr is empty.

Sorry I mistundertood your question. Thanks Arno for clarifying.
TWSocket.Addr is not used for the DNSLookup, so you can put the domain
in there.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Wednesday, January 4, 2006, 16:21, Ja wrote:

 Yes i meant that but... if the error occures i need to know with 
 what domain.

 procedure TForm1.WSocket1DnsLookupDone(Sender: TObject; ErrCode: 
 Word);
 begin
 if ErrCode = 0 then
 Memo1.Lines.AddStrings(TWSocket(Sender).DnsResultList)
 else
 Memo1.Lines.Add('DOMAIN_NAME: Unknown Error!');
 end;

 But dont know how to get the domain_name that just have been looked 
 up. TWSocket(Sender).addr is empty.


  Wiadomość Oryginalna 
 Od: Arno Garrels [EMAIL PROTECTED]
 Do: ICS support mailing twsocket@elists.org
 Data: Wed, 4 Jan 2006 16:11:29 +0100
 Temat: Re: [twsocket] WSocket DNSLookup.

 Wilfried,
 
 Not sure, but I think he meant this one:
 
 procedure TForm1.WSocket1DnsLookupDone(Sender: TObject; ErrCode: 
 Word);
 begin
 if ErrCode = 0 then
 Memo1.Lines.AddStrings(TWSocket(Sender).DnsResultList)
 else if ErrCode = 1 then
 Memo1.Lines.Add('Error: ' + WSocketErrorDesc(ErrCode))
 else
 Memo1.Lines.Add('Unknown Error!');
 end;
 
 procedure TForm1.ButtonOKClick(Sender: TObject);
 begin
 WSocket1.DnsLookup('www.adomain.com');
 end;
 
 
  Hello Ja,
  
  I think what you wants is the TDnsQuery component (also in ICS 
 package).
  WSocket.DNSLookup resolve a hostname to IP address.
 
 
 
 
  
  ---
  Rgds, Wilfried [TeamICS]
  http://www.overbyte.be/eng/overbyte/teamics.html
  http://www.mestdagh.biz
  
  Tuesday, January 3, 2006, 22:18, Ja wrote:
  
  
   Wiadomosc Oryginalna 
  Od: Wilfried Mestdagh [EMAIL PROTECTED]
  Do: ICS support mailing twsocket@elists.org
  Data: Tue, 3 Jan 2006 22:00:48 +0100
  Temat: Re: [twsocket] WSocket DNSLookup.
  
  Hello Ja,
  
  Is there any way to do a WSocket DNSLookup and OnLookupDone 
 get
  adress of host that have been looked up?
  
  I do not understeand the question. CAn you please rephrase it 
 ?
  
  
  I wouldlike to lookup some hosts ( with WSocket.
 DnsLookup($domain) )
  , and at the end add a results to memo, but... when there is no
  result (for example domain doesnt exist) i would like to add 
 text
  $domain doesnt exist! ... but have no idea how do i get 
 $domain
  string in OnLookupDone 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
 


-- 
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] Dnslookup... WSocket...

2006-01-03 Thread Wilfried Mestdagh
Hello Ja,

 Is DNSLookup with WSocket async?
   yes.

   please dont reply to a thread if subject is different. Many modern
   email reader can sort on thread so many people will not see your
   question if they are not interested in the thread (in this case
   'problem with overbyte website')

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
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] TCP server and UDP server

2006-01-02 Thread Wilfried Mestdagh
Hello Dorothea,

I have no idea about the components you mention. But ICS comes with
TWSocketServer component for TCP and you have TWSocket which you can use
for UDP. There are various examples coming with the package.

Please enter next time appropriate subject :)

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Monday, January 2, 2006, 08:21, Dorothea wrote:

 Hi Wilfried

 Thanks for your email and yes it worked however I am looking for the TCPServer
  UDPSServer components  not the components that were installed from the
 IcsDel50.dpk, is this because I am working with Delphi 5?  Would a later
 version of Delphi, for example Delphi 8 install the  TCPServer  UDPSServer
 components ?

 Regards

 D.Read

 ___

 Tiscali Broadband from 14.99 with free setup!
 http://www.tiscali.co.uk/products/broadband/

 Christmas gift ideas and festive features - visit the Tiscali Christmas 
 microsite.
 http://www.tiscali.co.uk/christmas



-- 
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] new year

2005-12-31 Thread Wilfried Mestdagh
Hello,

 I wants to wish TeamICS, Francois, and the whole community a happy new
 year, good business in 2006 and most of all interesting projects :)

--
Rgds, Wilfried
http://www.mestdagh.biz

-- 
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-V6 files and classes naming

2005-12-28 Thread Wilfried Mestdagh
Hello Francois,

 I wonder if I should also change all class names. For example rename
 TWSocket to TOverbyteIcsSocket or TIcsSocket. This way, ICS component would
 be clearly identified.

True.

 This of course would require a lot of changes in
 existing applications, including in dfm.

No the component users could have 2 sets of ICS installed, the old
generation and the new one.

But I'm also not sure if this is good solution, unless it is totally new
generation, like exclude all synchronious stuff, 1 hidden window (as
it is already), other stuff like in the past 10 years many properties
where add, could be it can be drastically simplified.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

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

2005-12-24 Thread Wilfried Mestdagh
Hello Steven,

I am very sorry that I offended you. But in my country it is habitude to
say some words to people in some seasons. I hope you understeand.

I also think that the few bytes text will not overflow some HDD or cost
on telephone lines :)

What does rebuke means ?

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Saturday, December 24, 2005, 19:37, Steven S. Showers wrote:

 I believe it is totally inappropriate to use
 this list to denigrate this holiday season. And
 so, in keeping with the spirit of the season,
 I would expect the list owner to publicly 
 rebuke Mr. Mestdagh in the most ardent 
 and stern manner, as Jesus did the 
 Pharisees.

-- 
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] WSOCKET sending/receiving files

2005-12-10 Thread Wilfried Mestdagh
Hello Selahattin,

 sometimes the first record was send correctly but the other records were
 currupt.. 

Please try to specify exacly whats wrong:

Can you tell when first record is send/received correct and when not ?
Also if first record is not correct then what exacly is not correct ?
Also what exacly is corrupt ?

You can download SocketSpy from user made and 'hang'it between sender
and receiver. Then you know already wich of the programs failing. Then
we can go on searching.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Saturday, December 10, 2005, 01:04, Selahattin Erkoc wrote:

 hi

 since 3 weeks I'm trying to send a file with TWSocket  and 
 TWSocketServer components..
 my idea was to send records like:

   pFileBuf = ^TFileBuf;
   TFileBuf = packed record
 ID : Integer;
 bufSize : Integer;
 buf: array[0..1023] of Byte;
   end;

 so I tried to receive these records in a pointer buffer and then to 
 process the buffer  like the ICS FAQ for TWSocket Receiving high speed
 data 
 http://users.pandora.be/sonal.nv/ics/faq/TWSocket.html#Receivinghighspeeddata228
 and write every single record to disk in ProcessData procedure

 sometimes the first record was send correctly but the other records were
 currupt.. 

 my WSocket1DataSent looks like this:
 ..
 var
  fbuf : TFileBuf;
 begin
 if sendnow then begin
   if not Eof(f) then begin
BlockRead(f,FBuf.buf,SizeOf(FBuf.buf),numread);
FBuf.bufSize:=numread;
FBuf.ID:=2;
   WSocket1.Send(@fbuf, SizeOf(tfilebuf));
   end;
 end; //sendnow
 end;//proc

 hope someone can help me :)

-- 
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] Discard any bytes in the read buffer

2005-12-08 Thread Wilfried Mestdagh
Hello Ionut,

Can you tell which component, which buffer etc ?
If you mean TWSocket and also means the receive buffer then the answer
is: just read them and do nothing with it.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Wednesday, December 7, 2005, 22:40, Ionut Muntean wrote:

 Hi,

 Is there any possibility to discard any bytes that are in the read
 buffer?

 10x

 / Ionut Muntean


-- 
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] Udp broadcast problem

2005-12-02 Thread Wilfried Mestdagh
Hello steffen,

I checked this key and it seems to contain a very long list of
applications. Study it I see it is all applications where I hade to
check 'unblock' in windows XP firewall to let them work, so if it is a
server then it is automaticly add. If it is a client of course not.

But interesting to know is that these clients only get broadcast
messages from withing the own network. I did not know this. I do not
mutch UDP...

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Friday, December 2, 2005, 12:49, steffen walter wrote:

 I found the problem. In the registry the key
 HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\SharedAccess\Parameters\Fir
 ewallPolicy\StandardProfile\AuthorizedApplications\List is an entry for the
 application. I don´t know why but only the exact path of this entry is
 allowed to receive the response from  Ip Adresses out of the subnet.

 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Im
 Auftrag von steffen walter
 Gesendet: Freitag, 2. Dezember 2005 10:15
 An: twsocket@elists.org
 Betreff: [twsocket] Udp broadcast problem

 Hello everybody,

 I hava a really stupid problem. I would like to send a udp broadcast to my
 network and receive the response form many devices. If i do this with the
 demo UdpSend ( Example from ICS ) it is working for devices with an Ip in my
 subnet and out of my subnet ( e.g. PC = 192.168.120.44 and device
 192.168.120.70 is responding and device 10.20.121.22 also ), the Wsocket
 always trigges the event WSocketDataAvailable ( I included this event in the
 demo ). So the demo is workin correctly.

 The crazy thing is that when I open a new project and copy the code, it is
 only working for devices with an IP within my subnet. I can see that I
 receive data from devices out of my subnet but the event
 WSocketDataAvailable is not triggerd.

 Can someone tell me what I do wrong? Do I have to open a special project? I
 can not find a difference between the demo and my own project with the
 copied code. ( I'm working with Delphi 2005 )

 Thanks for any response.

 Steffen Walter

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


Re: [twsocket] Problem with THttpCli

2005-12-01 Thread Wilfried Mestdagh
Hello SZ,

I checked the source, and this event if fired when FCtrlSocket.OnError
fires. So probably you have an exeption in your code in one of the event
handlers.

I think you can get the error with:
  THttpCli(Sender).CtrlSocket.LastError;

But pretty sure it comes from one of the event handlers.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Thursday, December 1, 2005, 13:57, Fastream Technologies wrote:

 Sorry, No, not the exception but the event OnSocketError. This is 
 TNotifyEvent and has no parameters except sender.

 Regards,

 SZ

 - Original Message - 
 From: Wilfried Mestdagh [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Thursday, December 01, 2005 12:18 PM
 Subject: Re: [twsocket] Problem with THttpCli


 Hello SZ,

 It gives no exception but throws ESocketError just after DNSLookup which
 is
 successful.

 Do you mean ESocketException ?
 What is the error ?

 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz

 Wednesday, November 30, 2005, 15:21, Fastream Technologies wrote:

 Hello,

 I chose the second method (THttpCli) but the below code fails in a 
 thread:

 HTTPClient = new THttpCli(NULL);
 HTTPClient-MultiThreaded = true;
 HTTPClient-FollowRelocation = false;
 HTTPClient-NoCache = false;
 HTTPClient-RcvdStream = NULL;
 HTTPClient-SendStream = NULL;
 // all the events are assigned here

 HTTPClient-URL = http://; + targetServerIP + : + targetServerPort +
 FPath;

 if(FParams.Length())
 HTTPClient-URL += ? + FParams;

 try
 {
 HTTPClient-GetASync();
 }
 catch(...

 It gives no exception but throws ESocketError just after DNSLookup which
 is
 successful. I tried with www.intel.com and the IE works just fine from
 here.
 I have a proxy setting for IE but that's optional and Mozilla works 
 without
 proxy ok. I also tried to point socketspy to intel.com and used browser
 to
 access localhost:8000 (the port socketspy runs on) which worked but 
 pointing
 HTTPClient did not.

 Any help would be appreciated. I am using the November (downloaded today)
 beta of ICS with -yet- no SSL.

 Best Regards,

 SZ


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


Re: [twsocket] Problem with THttpCli

2005-12-01 Thread Wilfried Mestdagh
Hello SZ,

I think so yes, but I'm not very familiar with THttpCli component. I use
THttpSrv often but not the client.

But to come back on your error. Can you eather put a try/catch block in
all events, or try to debug with the IDE option 'break on delphi
exception' on ?  I'm pretty sure the original exception is coming from a
code fragment of you and is catched by the OnError of the ctrlSocket.

I'm not 100% sure of the LastError, I just found it in the comment on
top. I never used OnError but still it is used by THttpCli component.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Thursday, December 1, 2005, 18:50, Fastream Technologies wrote:

 THttpCli(SenderLastError reads 0 in OnSocketError.

 What is unusual about my code is that I do not use a stream nor a file to
 get the data. I want to use the OnDocData and OnHeaderData events to read
 packet-by-packet. Is this possible? If yes how?

 Regards,

 SubZ

 - Original Message - 
 From: Wilfried Mestdagh [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Thursday, December 01, 2005 12:18 PM
 Subject: Re: [twsocket] Problem with THttpCli


 Hello SZ,

 It gives no exception but throws ESocketError just after DNSLookup which
 is
 successful.

 Do you mean ESocketException ?
 What is the error ?

 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz

 Wednesday, November 30, 2005, 15:21, Fastream Technologies wrote:

 Hello,

 I chose the second method (THttpCli) but the below code fails in a 
 thread:

 HTTPClient = new THttpCli(NULL);
 HTTPClient-MultiThreaded = true;
 HTTPClient-FollowRelocation = false;
 HTTPClient-NoCache = false;
 HTTPClient-RcvdStream = NULL;
 HTTPClient-SendStream = NULL;
 // all the events are assigned here

 HTTPClient-URL = http://; + targetServerIP + : + targetServerPort +
 FPath;

 if(FParams.Length())
 HTTPClient-URL += ? + FParams;

 try
 {
 HTTPClient-GetASync();
 }
 catch(...

 It gives no exception but throws ESocketError just after DNSLookup which
 is
 successful. I tried with www.intel.com and the IE works just fine from
 here.
 I have a proxy setting for IE but that's optional and Mozilla works 
 without
 proxy ok. I also tried to point socketspy to intel.com and used browser
 to
 access localhost:8000 (the port socketspy runs on) which worked but 
 pointing
 HTTPClient did not.

 Any help would be appreciated. I am using the November (downloaded today)
 beta of ICS with -yet- no SSL.

 Best Regards,

 SZ


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


Re: [twsocket] TWsocket/TWsocketServer sending/receiving Files

2005-11-17 Thread Wilfried Mestdagh
Hello Sela,

- Are you taken into account that nRead also can be 0 or -1 ?
- You create a TStream in every OnDataAvailable. I think you need the
  TStream to put the file in right ?  Then only create it one time.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Thursday, November 17, 2005, 21:50, Selahattin Erkoc wrote:

 hi,
 I have used both compenets to send/receive text but now I'm trying to 
 use it for sending files..
 so I tried just simple to open the file binary, read it and send it to
 the Server

  TCommand = record
   ID : Integer;
  end;

   TFileBuf = record
 ID : Integer;
 bufSize : Integer;
 buf: array[0..1024] of Byte;
   end;

 //send the file (client)
 while ...
 BlockRead(f, FileBuf.buf, SizeOf(FileBuf.buf), FileBuf.bufSize);
 FBuf.ID:=1;
 WSocket1.Send(@FileBuf, sizeof(FileBuf));
 end;

 before sending the file, the server gets some information about it 
 (size, name,  ...) - this works fine but if I try to send a file the 
 server doesn't get any new record  from the client:

 //ondata aviable...
 var
   buf   : array[Word] of Byte;
   fData : TMemoryStream;

   Filebuf  : ^TFileBuf;
   Command : TCommand;
   FileInfo : TFileInfo;
   OldPos   : Integer;

 begin
  fData:=TMemoryStream.Create;
  GetMem(Filebuf,SizeOf(TFileBuf));
  with sender as TWSocketClient do begin
nRead := Receive(@buf, High(Buf)- Low(buf));
OldPos := fdata.Position;
fData.WriteBuffer(buf, nRead);
try
  fData.Position := OldPos;
  fdata.ReadBuffer(Command, SizeOf(Command));
  if Command.ID = 1 then begin
fData.Position := OldPos;
fdata.ReadBuffer(Filebuf, SizeOf(Filebuf));
if CanWriteToFile then begin  //write data to file
  BlockWrite(f, Filebuf.buf, SizeOf(FileBuf.bufSize));
  currspeed:= currspeed + FileBuf.bufSize;
  Numwritten:=Numwritten+FileBuf.bufSize;
end;
  end else
 //... code for getting Fileinfo (works)

 some strange thing I recognized was that the client was sending/reading
 data in full speed while I was debugging and executing my code step by
 step :(

 has anybody an idea to solve this problem or another way to send a file
 except ftp or http (it shoud be recordbased)?

 ps sorry for the huge code in my mail

 thx Sela

-- 
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] WSocket sometimes stops to receive data

2005-11-11 Thread Wilfried Mestdagh
Hello Geppy,

 Yes, I already tried a simple client/server socket connection cutting
 almost all code not involved in communication, but the problem is the same.

Can you mail me this one. Probably (as always) nothing on television, so
I might as well look into it :)

ps.: unless there is per coincidence something interesting on TV :)

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Friday, November 11, 2005, 18:19, Geppy Piloni wrote:

 At 17.17 11/11/2005 +0100, you wrote:

Hello Geppy,

 Hello Wilfried,

1. 32 KB peak is still low traffic, so (as you also say) it cannot be a
performance problem. Could be that the stop communictaion when resizing
a form is a coincidence since you say it stops anyway after a while. I
never had that problem so difficult to advice.

 It could be, but half the times I resize/move/minimize/maximize the windows
 the communication stops immediately.

I assume that if one application in the chain is stopping that the chain
is broken and no application will send anymore ? So maybe the problem is
in only 1 application. Can you try to make just client + server to see
if same problem arrise ?

 Yes, I already tried a simple client/server socket connection cutting 
 almost all code not involved in communication, but the problem is the same.
 All the Socket communication code is taken directly from your samples 
 (Server1.zip, http://tinyurl.com/cqkmh ) as we discussed some days ago in
 this mailing list (thread 'Sending a mix of text and records through 
 TWSocket').
 The only difference is in some new methods added to manage the records
 manipulation and a loop for all connected clients to transmit the data
 through the second WSocketServer to third layer's clients.
 The hard thing it that no exceptions at all are raised, I don't understand
 which is the broken ring.
 The sockets maintain their connections but no data is transmitted/received.

If you can make a simple project to demonstrate the behaviour I and
other can do a test run for debug.

 Since they are three different projects and a lot of code, I don't want to
 abuse of your patience.
 I'll try first with threads as suggested by Francois and if I'll have no
 luck, I'll post the code here.

 Thank you very much Wilfred.

 Ciao.
 --
 Geppy Piloni



-- 
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] Strange behavior or not?

2005-11-09 Thread Wilfried Mestdagh
Hello Larini,

 I'm getting unstable times, from 70 ms to 3 seconds.

This can happen. It is depending the traffic on the network. If very
heavy on a large network it _can_ take a while.

 while gWait do
 begin
 application.ProcessMessages;
 sleep(1);
 end;

This is not needed, you only waste CPU here. Use ClientDataAvailable to
send the next, not for flagging a loop !

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Wednesday, November 9, 2005, 21:26, Larini wrote:

 Hi, here is my simple app, one client and one server. The mission: send a
 message from client to server and wait for replay.
 I'm getting unstable times, from 70 ms to 3 seconds. My question is: this is
 normal? What kind of client-server configuration I must have to get more
 stable results (like 200 ms most of time)?


 Client:
 procedure TForm2.clientSessionConnected(Sender: TObject; ErrCode: Word);
 var a:Integer;
 begin
 for a:=0 to 500 do
 begin
 LastTick:=Gettickcount;
 Client.SendLine('* msg to
 server *');
 gWait:=true;
 while gWait do
 begin
 application.ProcessMessages;
 sleep(1);
 end;
 end;
 end;

 procedure TForm2.clientDataAvailable(Sender: TObject; ErrCode: Word);
 var s:String;
 begin
 if ErrCode0 then
 exit;
 s:=Client.ReceiveStr;
 memo1.lines.add(Inttostr(Gettickcount-LastTick)+' - '+ trim(s));
 gWait:=false;
 end;

 Server:
 procedure TForm1.CliSocketDataAvailable(Sender: TObject; ErrCode: Word);
 var s:String;
 begin
 if ErrCode0 then
 exit;
 s:=(sender as TWSocket).ReceiveStr;
 memo1.Lines.Add(trim(s));
 (sender as TWSocket).SendLine(trim(s));
 end;


 Result:
 109 - * msg to server
 *
 78 - * msg to server
 *
 47 - * msg to server
 *
 78 - * msg to server
 *
 4343 - * msg to server
 *
 63 - * msg to server
 *
 47 - * msg to server
 *
 63 - * msg to server
 *
 78 - * msg to server
 *
 62 - * msg to server
 *
 219 - * msg to server
 *
 78 - * msg to server
 *
 63 - * msg to server
 *
 47 - * msg to server
 *
 63 - * msg to server
 *
 296 - * msg to server
 *
 78 - * msg to server
 *
 78 - * msg to server
 *
 781 - * msg to server
 *
 329 - * msg to server
 *
 188 - * msg to server
 *
 157 - * msg to server
 *
 141 - * msg to server
 *
 907 - * msg to server
 *
 235 - * msg to server
 *


 
 This mail was sent by
 Webmail 2.5


-- 
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] Hi, my darling :)

2005-11-05 Thread Wilfried Mestdagh
Hello DZ-Jay,

I will then ignore it too and not answer the spam...
but still we dont know what WTF means !

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Saturday, November 5, 2005, 20:35, DZ-Jay wrote:

 So, let me get this straight, this was a stray spam message sent to the
 list, not posted by Francois as an example of something?  I thought it
 might have been a sample of forged headers...

 Then I shall ignore it. :)

   dZ.

 On Nov 5, 2005, at 13:13, Francois PIETTE wrote:

 This is a fake email address. I frequently receive emails sent by 
 myself,
 well which seems to be sent by myself. Easy to do with any SMTP 
 component
 :-)
 To see where it really comes from you have to look at the SMTP headers
 inside the mail (CTRL+F3 in Outlook Express):

 Received: from jester.tesla.co.il (jester.tesla.co.il [64.34.172.189]
 (may
 be forged))
  by hexa.netline.be (8.13.4/8.13.4) with ESMTP id jA5HFEti026484
  for [EMAIL PROTECTED]; Sat, 5 Nov 2005 18:15:15 +0100
 Received: from jester.tesla.co.il (localhost [127.0.0.1])
  by jester.tesla.co.il (Postfix) with ESMTP id 39E74658104;
  Sat,  5 Nov 2005 17:14:45 + (UTC)
 X-Original-To: twsocket@elists.org
 Delivered-To: twsocket@elists.org
 Received: from localhost (D254.D-IP02.lipetsk.ru [195.34.229.254])
  by jester.tesla.co.il (Postfix) with ESMTP id 5781E6580EB
  for twsocket@elists.org; Sat,  5 Nov 2005 17:14:39 + (UTC)

 It has been sent by 195.34.229.254 which is a russian address.

 --
 [EMAIL PROTECTED]
 http://www.overbyte.be

 - Original Message -
 From: Arno Garrels [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Saturday, November 05, 2005 6:26 PM
 Subject: Re: [twsocket] Hi, my darling :)


 How is that possible???

 [EMAIL PROTECTED] wrote:
 Look at my new screensaver. I hope you will enjoy...
 Your Liza
 MIME-Version: 1.0
 Content-Type: multipart/mixed;
 boundary==_NextPart_000_0008_2FB8E6CD.2F5575A5
 X-Priority: 3
 X-MSMail-Priority: Normal

 This is a multi-part message in MIME format.

 --=_NextPart_000_0008_2FB8E6CD.2F5575A5
 Content-Type: text/plain;
charset=windows-1252
 Content-Transfer-Encoding: 7bit

 RE: order


 --=_NextPart_000_0008_2FB8E6CD.2F5575A5
 Content-Type: application/x-msdownload; name=AGen1.03.exe
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename=AGen1.03.exe



 --=_NextPart_000_0008_2FB8E6CD.2F5575A5--
 -- 
 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



-- 
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] Hi, my darling :)

2005-11-05 Thread Wilfried Mestdagh
Hello Arno,

 Nice, I second that (always learning :).

me too :)

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
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] Design problem: function result and getAsync

2005-11-03 Thread Wilfried Mestdagh
Hello Lutz,

Just write as always but you have a typical code that need to be
executed in a separate object. So let the object behave as a normal
ojbect. Later it is also very easy to use the thing in other
applications. And you can use the normal async methods.

unit uJob

type
  TJobResult = procedure(Sender: TObject; const TheResult: string) of
object;
  TJob = class
  private
FCli: THTTPCli;
FOnResult: TJobResult;
procedure TriggerResult(const TheResult: string);
  public
procedure GetResult;
property OnResult: TJobResult read FOnResult write FOnResult;
  end;

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Thursday, November 3, 2005, 03:26, Lutz Schröer wrote:

 Hi,

 I've got a small design problem with the GetAsync method. My basic 
 understanding is that after I called the getAsync method I have to do 
 the further processing in httpRequestDone. This is no problem until I 
 want to put the code in a different unit. For example:

 unit1.pas:
 --
 function xxx.getResult(): string;
 begin
http.getAsync;
 end;

 procedure xxx.httpRequestDone(Sender: TObject; RqType: THttpRequest;
   ErrCode: Word);
 begin
   // do some result processing
 end;


 main.pas:
 --
 [...]
 result := unit1.getResult();
 [...]

 Obviously this can't work. How do I have to design my unit so that I 
 create a nice and simple function call in my main program but the actual
 code resides in a different unit?

 Cheers
 Lutz




-- 
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] transmission stress test

2005-11-01 Thread Wilfried Mestdagh
Hello David,

I suggest to first see if the sender or the receiver fails. you can easy
do that if you hang SocketSpy (user made) between them.

 Line 4117: Received -1 bytes, Remaining 3123 bytes
 Line 4118: WARNING! Transfer went wrong! Error 0

No nothing went nececary wrong. Ignore 0 and -1, just receive, and if
count is = 0 then Exit the OnDataAvailable. It will fire again if
winsock wants to deliver again.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
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] SocketSpy Re-Reply

2005-11-01 Thread Wilfried Mestdagh
Hello,

Sorry, you need a typecast:

 Client := TClient(WSocketServer.Client[n]);

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Tuesday, November 1, 2005, 11:09, ICSNewbie2005 wrote:

 Hi Mr. Wilfried M.,
 Yes below is code I am talking about =), When i went to compile though it
 say Incompatible types.
 Client which is of Type (TClient) and the assignment
 to wSocketServer.Client[] which is of Type (TWSocketClient).
 Lol i did not know sending data to 2 different connection make so hard but
 i'm new to delphi too. Thank you for patience. Your code below
   procedure TForm1.SendToAllBtnClick(Sender: TObject);
 var
 n: integer;
 Client: TClient;
 begin
 for n := 0 to WSocketServer.ClientCount - 1 do try
 Client := WSocketServer.Client[n];
 Client.SendStr('str1');
 Client.RemoteSocket.SendStr('str2');
 except
 end;
 end;
  -ICSNewbie05

-- 
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] Send one big or a lot of small strings

2005-11-01 Thread Wilfried Mestdagh
Hello Larini,

for winsock it will end up probably the same, but in (2) you are 80
times re-allocating memory and probably copying bytes several times.

if you really dont can create the send buffer at once you can do this:

for a := 0 to 80 do
Socket.PutStringInSendBuffer(MyString);
Socket.Send(nil, 0);

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Tuesday, November 1, 2005, 09:54, Larini wrote:

 Hi, I want to know if there are a difference between the two codes bellow:

 MyString = 100 bytes

 1.
 For a:=0 to 80 do
 socket.SendStr(MyString);


 2.
 For a:=0  to 80 do
 aux:=aux+MyStr;
 socket.SendStr(aux);


 The first one, sends about 8000 bytes using 80 sendstr commands
 The second send about 8000 bytes using only one command.

 There are difference or in the first one will send all together too?

 Thanks.

 
 This mail was sent
 by Webmail 2.5


-- 
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] transmission stress test

2005-11-01 Thread Wilfried Mestdagh
Hello David,

 So I ignored the zero und -1 returned by the Receive(), and it worked :)

Great !  I'm glad it works for you :)

 But the TempSize in my code was never changed. it was set as to a 
 constant value en the constructor.

Ok no problem then. But if your buffer has a constant size, then wy not
put it on the stack like this:
var
  Buffer: array[0..TempSize] of char;
begin
  // receive in buffer

 decrease the GetMem(), Free() as much as possible.. so I think I'll do
 it before the first request, and free it after the last request...

Yes that's another option. Then you only have 1 time allocation, but see
paragraph above.

 for reassembling the original stream, what do you think ? consecutive
 Realloc() (First scenario) or Array of pointer (Second scenario)?

Difficult to say wahts best because it is depending on what you exacly
wants or have to do with it.

- if you have to save it to a file then you can:
  - open the file at first packet
  - receive in buffer
  - write buffer direkt to file
  - close file at last packet
  -- the most fast is to use the low level routines: FileOpen(), etc...

- TFileStream is another option, somewhat slower

- if you have to do other things with it then you can
  - use a TMemoryStream
  - or a dynamicly allocate buffer that you take care yurself

  Both of course will reallocate when data grow, however you can for
  both options set the size at first, then also only 1 memallcoation and
  no reallocation.

- array of pointer seems more difficult. Dont think you will have
  advantage using it.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
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] Send one big or a lot of small strings

2005-11-01 Thread Wilfried Mestdagh
Hello Arnaldo,

Yes that is another option, but the 1 second delay he had has nothing to
do with it. TCP_NODELAY disable the Nagle algoritm. If my RAM serve me
well Nagle will wait at maximum 100 milliseconds for transmit to see if
something else is coming.

And it will do this delay only if there is a small packet smaller than
the MTU (aroun 1500 byes), so if he send 80 packets of 100 bytes (as in
the other mail), only the last packet could delay with this time
maximum.

I never tryed it myself because they also talk about network
degradation if disabling it.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Tuesday, November 1, 2005, 18:03, Arnaldo Braun wrote:



 You can force socket  faster small packet sending by using TWsocket ---
 ComponentOptions  wsoTcpNoDelay  --- true

 See Microsoft socket  help files about possible collateral effects 
 (search setsockopt TCP_NODELAY)


 Larini wrote:

Why this event must be used?
I'm testing my application and some times a send of a small packet take 1
second, other times the same packet take about no time. There is a way to
force send anyway?
  



-- 
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] mmorpg capacity question

2005-11-01 Thread Wilfried Mestdagh
Hello Jack,

There is no limitation. The difference is that the server versions will
hadle more efficient this kind of huge IO.

The only limitation is the amount of non-paged memory pool (the part
that not be swapped to disk). On Intel86 systems this pool can grow to
maximum 1/8 of phisical RAM. Also there is a hard maximum of 256 MB (128
MB on NT).

A socket use around 2 KB of memory, but it will also send and receive.
This is done by overlapped IO whitch also use the non paged pool.
Overlapped IO is done in blocks of 4 KB. So a socket that read and write
eat 10 KB. This can be (not calculatable) very mutch higher if you do
very fast data on fast networks. On the other hand many sockets only
are sitting there while another is doing the work. So take 6 KB as
average.

There can be other programs running on same machine using non-paged pool
also, so be carefull if you have to write specs for a target machine.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Wednesday, November 2, 2005, 04:40, Jack wrote:

 I wonder what the limitations on workstation versions are?
 A few hundreds?

 You need to have a Windows _server_ version to support
 1000 simultaneous connections.




-- 
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] SocketSpy (User Made) Question...

2005-10-31 Thread Wilfried Mestdagh
Hello brock,

I'm not sure I understeand what you try to do but:

 declared separately in the unit. When i tried to remove the RemoteSocket
 declaration from
 type
 TClient = class(TWSocketClient)
  snip
 and make it a global variable when sending local and remote data at the same

You cannot. RemoteSocket is owned by TClient. Each TClient has his own
remotesocket. If you make it global there can only be 1 of it.

  for i:=0 to wSocketServer.ClientCount-1 do wSocketServer.Client
 [i].SendStr(data);

This will send data to all the clients of the server (the local ones).

  if Assigned(RemoteSocket) then
 RemoteSocket.SendStr(data2);

RemoteSocket is owned by that particular client of the server. Here you
send data2 to that particular remote socket.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Monday, October 31, 2005, 04:34, brock williams wrote:

 hi i was looking through SocketSpy source code under User Made section of
 ICS website and when i tested program i was curious about something. If i
 would like to send data (packets) to both the remote connection and local
 connection how would i do so?
  A TWSocketServer component exist on the form but it spawns the client
 declared separately in the unit. When i tried to remove the RemoteSocket
 declaration from
 type
 TClient = class(TWSocketClient)
 private
 Rcvd: string;
 Color: TColor;
 public
  RemoteSocket: TWsocket;
 Destructor Destroy; override;
 end;
 and make it a global variable when sending local and remote data at the same
 time i was not able to do so, only 1 at a time.What i'm asking is, how can I
 send data (e.g) under a button click event instead of having to send data
 only in the OnClientDataAvailable event etc.. I need to use both server and
 client sockets at literally the same time, one line under the other using
 SendStr(). I tried something like this but Remote connection took priority
 over local in sending.
  for i:=0 to wSocketServer.ClientCount-1 do wSocketServer.Client
 [i].SendStr(data);
  if (Assigned(RemoteSocket)) and (RemoteSocket  nil) then
 RemoteSocket.SendStr(data2);
  Any help would be greatly appreciated.
 --ICSNewbie05

-- 
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] OK to Receiving 2GB ?

2005-10-30 Thread Wilfried Mestdagh
Hello David,

 How do I know the maximum size possible?

at receiving side, specially depending on the speed of your own program
you mostly never get above 8 kb. However I have seen receiving packets
10 time as high. But you dont have to care mutch, if you receive not
all, then OnDataAvailable is immediatly called again, meaning if you
have a temporary buffer that is to small, however if you receive on the
stack then you can make him (almost) as large you wants.

 I certainly don't want to malloc 100KB for a TCP packet...

See above, you dont need to.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Saturday, October 29, 2005, 20:25, Kei wrote:

 Hi!

 I think I'm going to accept the reality that... TCP packets are splitted
 into arbitrary sizes.. but!!!
 How do I know the maximum size possible? What is the maximum size that a
 packet can be? I certainly don't want to malloc 100KB for a TCP packet...

 Thanks!

 David

 Wilfried Mestdagh wrote:

Hello David,

  

Hi! I'm new to ICS!



Welcome to the group :)

  

A-B: msg hello
B-A: msg yo! how's it going?



Yes that's the way to go. Design a user made proto for what you intend
to do.

  

If A is larger than the default buffer size (256 chars) then the A
(sender) will warn B in advance



You can do that, but is not nececary. Also you will maybe have a very
mutch allocation / deallocation of memory and you can eventually end up
with fragmented memory where you have not a nice large block in it at
the moment you need it. But it can work, just think over carefully. A
better idea is often to make a receive buffer that grows automatically
if (and only if) needed, and then just reuse that buffer over and over
again. Then you have some (re)allocation in begin but then stable.

  

TWSocket will automatically split it into packets,



Winsock will split in packets as large as the MTU (around 1500 bytes).
Eventually data can (and will if high speed) arrive as 1 large packet
but not necacarely.

  

I really want the sender side to send the 1MB file all at once, since I
do the FileWrite() right after Receive()



No you cannot. Winsock does not respect packet boundaries, but (see
prior paragraph) there are no megabytes TCP packets.

You have to receive all data chuncks into a buffer, and when you
received them all then you save to file (or save every packet direct to
disk). There is no problem to know the moment of close the file because
you know the length of the data from your protocol.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Saturday, October 29, 2005, 11:01, Kei wrote:

  

Hi! I'm new to ICS!



  

I am designing a simple protocol that will be mainly used locally (as a
database server backend)..so I'm guessing I could send up to 2GB of
stuff without hassle (BLOBs, for example). Right now I'm just
experimenting with the facility for two parties to effectively talk to
each other, even with long long messages, and with binary data transfer.
For example, for sending a message, the command is msg [text]



A-B: msg hello
B-A: msg yo! how's it going?

  

If A is larger than the default buffer size (256 chars) then the A
(sender) will warn B in advance, like this: hey! I'm gonna send you
1 bytes of text



A-B: longmsg 1
B-A: ready msg
A-B: msg blahblahblah...blah!

  

In this case, B will be notified of the text size, then when
OnClientDataAvailable() event comes, it will malloc a bigger buffer,
then Receive(CustomSized_Buffer, SizeHeToldMe). Similarly Im considering
the same mechanism to send binary data. But if the file is slightly


larger (10KB) then TWSocket will automatically split it into packets,
  

which I don't want it to do:



A-B: upload 1048576 picture.jpg
B-A: ready upload
A-B: 01001010101010.. (10720 bytes)
A-B: 1010101012.. (10720 bytes)
  

:
:


A-B: 01001010101010.. (4023 bytes)

  

I really want the sender side to send the 1MB file all at once, since I
do the FileWrite() right after Receive()



  

Could anybody please help me on this issue?



  

Thanks!



  

David
















  



-- 
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] OK to Receiving 2GB ?

2005-10-30 Thread Wilfried Mestdagh
Hello David,

Thanks for feedback. That is indeed the right way to do it. Remember
that Receive() may return -1, and in that case you dont want to
substrackt it from BytesRemaining, so something like this:

 Count := TWSocket(Sender).Receive(Buf, Min(BufSize, BytesRemaining));
 if Count = 0 then
   Exit;
 Dec(BytesRemaining, Count);
 ...

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Sunday, October 30, 2005, 08:28, Kei wrote:

 Hi Everyone

 I've solved this problem.. what I do is make a count of How many bytes
 remaining. Everytime the value returned by Receive() will be subtracted
 from the BytesRemaining. When OnDataAvailable is repeatedly called, a
 buffer is kept being ReAlloc()'ed . When ByteRemaining reaches zero,
 then a WriteFile will be performed, so that the buffer is written to disk..

 Thanks!

 David

 Wilfried Mestdagh wrote:

Hello David,

  

How do I know the maximum size possible?



at receiving side, specially depending on the speed of your own program
you mostly never get above 8 kb. However I have seen receiving packets
10 time as high. But you dont have to care mutch, if you receive not
all, then OnDataAvailable is immediatly called again, meaning if you
have a temporary buffer that is to small, however if you receive on the
stack then you can make him (almost) as large you wants.

  

I certainly don't want to malloc 100KB for a TCP packet...



See above, you dont need to.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Saturday, October 29, 2005, 20:25, Kei wrote:

  

Hi!



  

I think I'm going to accept the reality that... TCP packets are splitted
into arbitrary sizes.. but!!!
How do I know the maximum size possible? What is the maximum size that a
packet can be? I certainly don't want to malloc 100KB for a TCP packet...



  

Thanks!



  

David



  

Wilfried Mestdagh wrote:



  

Hello David,

 

  

Hi! I'm new to ICS!
   



Welcome to the group :)

 

  

A-B: msg hello
B-A: msg yo! how's it going?
   



Yes that's the way to go. Design a user made proto for what you intend
to do.

 

  

If A is larger than the default buffer size (256 chars) then the A
(sender) will warn B in advance
   



You can do that, but is not nececary. Also you will maybe have a very
mutch allocation / deallocation of memory and you can eventually end up
with fragmented memory where you have not a nice large block in it at
the moment you need it. But it can work, just think over carefully. A
better idea is often to make a receive buffer that grows automatically
if (and only if) needed, and then just reuse that buffer over and over
again. Then you have some (re)allocation in begin but then stable.

 

  

TWSocket will automatically split it into packets,
   



Winsock will split in packets as large as the MTU (around 1500 bytes).
Eventually data can (and will if high speed) arrive as 1 large packet
but not necacarely.

 

  

I really want the sender side to send the 1MB file all at once, since I
do the FileWrite() right after Receive()
   



No you cannot. Winsock does not respect packet boundaries, but (see
prior paragraph) there are no megabytes TCP packets.

You have to receive all data chuncks into a buffer, and when you
received them all then you save to file (or save every packet direct to
disk). There is no problem to know the moment of close the file because
you know the length of the data from your protocol.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Saturday, October 29, 2005, 11:01, Kei wrote:

 

  

Hi! I'm new to ICS!
   



 

  

I am designing a simple protocol that will be mainly used locally (as a
database server backend)..so I'm guessing I could send up to 2GB of
stuff without hassle (BLOBs, for example). Right now I'm just
experimenting with the facility for two parties to effectively talk to
each other, even with long long messages, and with binary data transfer.
For example, for sending a message, the command is msg [text]
   



A-B: msg hello
B-A: msg yo! how's it going?

 

  

If A is larger than the default buffer size (256 chars) then the A
(sender) will warn B in advance, like this: hey! I'm gonna send you
1 bytes of text
   



A-B: longmsg 1
B-A: ready msg
A-B: msg blahblahblah...blah!

 

  

In this case, B will be notified of the text size, then when
OnClientDataAvailable() event comes, it will malloc a bigger buffer,
then Receive(CustomSized_Buffer, SizeHeToldMe). Similarly Im considering
the same mechanism to send binary data. But if the file is slightly
   



larger (10KB) then TWSocket will automatically split it into packets,
 

  

which I don't want it to do:
   



A-B: upload 1048576 picture.jpg
B

Re: [twsocket] OK to Receiving 2GB ?

2005-10-30 Thread Wilfried Mestdagh
Hello David,

 I don't allocate the memory up to the size of the Designated size but
 keep realloc-ing until remaining-byte counter reaches zero..

I'm not sure I understeand exacly what you mean. But if you are
reallocating memory whole the time, you end up with a non efficient
program, if not talking about memory fragmentation.

What Arno meant was to receive in a fixed buffer and copy that buffer to
the place you want, eg a TFileStream. For the fixed buffer you even not
need to allocate memory, just put it on the stack as this:

procedure TApp.OnDataAvailable(Sender: TObject; Error: word);
var
  Buf: array[0..MAX_BUF_SIZE - 1] of char;
begin
  // receive here

 Which one is more efficient performance-wise?

I think you wants to save to a file. The most efficient is to receive in
a fixed buffer, then write the buffer to a file with the lower level
routines FileWrite(). Open the file just once in begin, and Close it
only when all data is received, or session is closed.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Sunday, October 30, 2005, 15:42, Kei wrote:

 I don't allocate the memory up to the size of the Designated size but
 keep realloc-ing until remaining-byte counter reaches zero..

 Do you think I should use TStream (Stream.readbuffer, readbuffer, ...)
 or just a pointer of buffer (malloc, realloc, and basic pointer 
 operations) ? Which one is more efficient performance-wise?

 David

 Arno Garrels wrote:

Do you allocate memory up to the size of data the client intends to send?
That would be a huge waste of memory and won't work upon large data.
Instead receive into a buffer of let's say 8 kb and write it to your
stream at once, receive next chunk and so on. You don't have to take care
of packet size, it's something on a lower layer encapsulated by winsock.

---
Arno Garrels [TeamICS]


  

Thanks!

David

Wilfried Mestdagh wrote:



Hello David,



  

How do I know the maximum size possible?




at receiving side, specially depending on the speed of your own program
you mostly never get above 8 kb. However I have seen receiving packets
10 time as high. But you dont have to care mutch, if you receive not
all, then OnDataAvailable is immediatly called again, meaning if you
have a temporary buffer that is to small, however if you receive on the
stack then you can make him (almost) as large you wants.



  

I certainly don't want to malloc 100KB for a TCP packet...




See above, you dont need to.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Saturday, October 29, 2005, 20:25, Kei wrote:



  

Hi!





  

I think I'm going to accept the reality that... TCP packets are splitted
into arbitrary sizes.. but!!!
How do I know the maximum size possible? What is the maximum size that a
packet can be? I certainly don't want to malloc 100KB for a TCP
packet... 





  

Thanks!





  

David





  

Wilfried Mestdagh wrote:





  

Hello David,





  

Hi! I'm new to ICS!






Welcome to the group :)





  

A-B: msg hello
B-A: msg yo! how's it going?






Yes that's the way to go. Design a user made proto for what you intend
to do.





  

If A is larger than the default buffer size (256 chars) then the A
(sender) will warn B in advance






You can do that, but is not nececary. Also you will maybe have a very
mutch allocation / deallocation of memory and you can eventually end up
with fragmented memory where you have not a nice large block in it at
the moment you need it. But it can work, just think over carefully. A
better idea is often to make a receive buffer that grows automatically
if (and only if) needed, and then just reuse that buffer over and over
again. Then you have some (re)allocation in begin but then stable.





  

TWSocket will automatically split it into packets,






Winsock will split in packets as large as the MTU (around 1500 bytes).
Eventually data can (and will if high speed) arrive as 1 large packet
but not necacarely.





  

I really want the sender side to send the 1MB file all at once, since
I do the FileWrite() right after Receive()






No you cannot. Winsock does not respect packet boundaries, but (see
prior paragraph) there are no megabytes TCP packets.

You have to receive all data chuncks into a buffer, and when you
received them all then you save to file (or save every packet direct to
disk). There is no problem to know the moment of close the file because
you know the length of the data from your protocol.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Saturday, October 29, 2005, 11:01, Kei wrote:





  

Hi! I'm new to ICS!








  

I am designing a simple

Re: [twsocket] OK to Receiving 2GB ?

2005-10-29 Thread Wilfried Mestdagh
Hello David,

 Hi! I'm new to ICS!

Welcome to the group :)

 A-B: msg hello
 B-A: msg yo! how's it going?

Yes that's the way to go. Design a user made proto for what you intend
to do.

 If A is larger than the default buffer size (256 chars) then the A
 (sender) will warn B in advance

You can do that, but is not nececary. Also you will maybe have a very
mutch allocation / deallocation of memory and you can eventually end up
with fragmented memory where you have not a nice large block in it at
the moment you need it. But it can work, just think over carefully. A
better idea is often to make a receive buffer that grows automatically
if (and only if) needed, and then just reuse that buffer over and over
again. Then you have some (re)allocation in begin but then stable.

 TWSocket will automatically split it into packets,

Winsock will split in packets as large as the MTU (around 1500 bytes).
Eventually data can (and will if high speed) arrive as 1 large packet
but not necacarely.

 I really want the sender side to send the 1MB file all at once, since I
 do the FileWrite() right after Receive()

No you cannot. Winsock does not respect packet boundaries, but (see
prior paragraph) there are no megabytes TCP packets.

You have to receive all data chuncks into a buffer, and when you
received them all then you save to file (or save every packet direct to
disk). There is no problem to know the moment of close the file because
you know the length of the data from your protocol.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Saturday, October 29, 2005, 11:01, Kei wrote:

 Hi! I'm new to ICS!

 I am designing a simple protocol that will be mainly used locally (as a
 database server backend)..so I'm guessing I could send up to 2GB of
 stuff without hassle (BLOBs, for example). Right now I'm just
 experimenting with the facility for two parties to effectively talk to
 each other, even with long long messages, and with binary data transfer.
 For example, for sending a message, the command is msg [text]

A-B: msg hello
B-A: msg yo! how's it going?

 If A is larger than the default buffer size (256 chars) then the A
 (sender) will warn B in advance, like this: hey! I'm gonna send you
 1 bytes of text

A-B: longmsg 1
B-A: ready msg
A-B: msg blahblahblah...blah!

 In this case, B will be notified of the text size, then when
 OnClientDataAvailable() event comes, it will malloc a bigger buffer,
 then Receive(CustomSized_Buffer, SizeHeToldMe). Similarly Im considering
 the same mechanism to send binary data. But if the file is slightly
larger (10KB) then TWSocket will automatically split it into packets,
 which I don't want it to do:

A-B: upload 1048576 picture.jpg
B-A: ready upload
A-B: 01001010101010.. (10720 bytes)
A-B: 1010101012.. (10720 bytes)
 :
 :
A-B: 01001010101010.. (4023 bytes)

 I really want the sender side to send the 1MB file all at once, since I
 do the FileWrite() right after Receive()

 Could anybody please help me on this issue?

 Thanks!

 David














-- 
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] mail format

2005-10-27 Thread Wilfried Mestdagh
Hello,

Never worried about this, but now I have to decode some mail formatted
like this:

 -=A0=A0=A0=A0=A0=A0=A0=A0=A0 here some text
  =20

Is there some RFC describing how to decode this ?

--
Rgds, Wilfried
http://www.mestdagh.biz

-- 
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] Sending a mix of text and records through TWSocket

2005-10-27 Thread Wilfried Mestdagh
Hello Geppy,

 FillChar(Data, SizeOf(TData), 0);

Sorry for that. I have habitude to get rid of compiler warnings, even in
a short demo where in this case it was not needed :(

I'm glad it works for you now :)

1 additional note. You can also receive direct in your record. This save
an additional copy of the received binary data.

eg:

RcvdBuf: array[0..8191] of char;
MyRecord: TMyRecord absolute RcvdBuf;

Both start at same address.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
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] Sending a mix of text and records through TWSocket

2005-10-26 Thread Wilfried Mestdagh
Hello Geppy,

As Kirk and Arno mentioned show us how you receive the data. maybe one
remark at the moment:

wsocket.LineMode := True;
WSocket.SendStr(EditCommand.Text + #13#10); // the command is 'DATA '
// r fields filled with some data
pr := @r;
wsocket.LineMode := False;
wsocket.Send(pr, SizeOf(r));

Not needed to switch LineMode at the sender. TWSocket will only use
lineMode whilst receivin.

Also better to work event driven between the 2 applications:
- send data whitch tell receiver you want to send a certain binary
- receiver set linemode to false and answer 'ok i'm ready'
- sender send the binary when he received the 'ok ready'
- receiver say 'ok received' and switch lineMode back on
- sender can go on now with next command if any

on sender lineMode may be switched on all the time as he does only
receive line based commands.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Wednesday, October 26, 2005, 19:09, Geppy Piloni wrote:



 Hi all,
 I'm trying to implement the client server architecture described here:
 http://tinyurl.com/benop
 My first approach was with Indy 10, but after some attempts, I found quite
 difficult to manage the complexity of multithread programming, so I dropped
 Indy and now I'm trying ICS.
 I had a positive experience with ICS HTTP and mail components some years
 ago and I feel more comfortable with event handling than multithreading...

 I found a very useful example here http://tinyurl.com/cqkmh , Server1.zip :
 thank you Wilfried :)
 I studied also the ICS FAQ about receiving high speed data 
 http://tinyurl.com/762c6

 Starting from various TCP client inlcuded in ICS examples, I tried to send
 through TWSocket a mix of text commands and records but I wasn't successful.

 Assuming a given record and his pointer...

 PTMyRec = ^TMyRec;
 TMyRec = packed record
..
..
 end;

 ... and following the protocol implemented in the above mentioned example
 (server1.zip) I'm trying to send a text command followed by a record.

 I tried this way from a generic client:

 var
pr : PTMyRec;
r : TMyRec;
 begin
wsocket.LineMode := True;
WSocket.SendStr(EditCommand.Text + #13#10); // the command is 'DATA '
// r fields filled with some data
pr := @r;
wsocket.LineMode := False;
wsocket.Send(pr, SizeOf(r));
 end;

 On the server, I receive correctly the text command but not the record.
 What I'm doing wrong?

 Thank you in advance for your replies.
 --
 Geppy Piloni


-- 
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] Does THttpCli timeout?

2005-10-26 Thread Wilfried Mestdagh
Hello Jack,

real quick answer :)
 correct !

Winsock will timeout after a while, but this is depending on many
factors and can take a long time. For automated aplications use your own
timeout.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Wednesday, October 26, 2005, 19:24, Jack wrote:

 Hello,

 Real quick question.

 It is my understanding that THttpCli does not timeout.
 Say, it has connected to the web server and sent the request.
 But if the server doesn't send anything back, THttpCli will
 not timeout. Am I correct?

 -- 
 Best regards,
 Jack


-- 
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] Does THttpCli timeout?

2005-10-26 Thread Wilfried Mestdagh
Hello Jack,

 I wonder why would winsock even time out in this case?
 Isn't it legitimate to have a socket connected and doing nothing?

Yes of course. As always I anser to fast without carefully reading the
request :( If yoiu connect and do nothing noone will timeout of course,
unless the server or client has a timeout if no data is transmit/rcv.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
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] Using HTTPCli in threads

2005-10-25 Thread Wilfried Mestdagh
Hello Nick,

 things at once - do I have to drop 4 HttpCli components on the form or
 can I create them at run time?

If you drop themon a form then they are created and so will operate in
main thread context.

 and you can't use 1 HttpCli to download two
 things at once

No but you can use 4 HttpCli in the same thread doing 4 different
downloads. You dont need thread to have multiple components doing the
same, all work is done in background while your program can do other
things. Note that you can use same event handlers for all the
components.

 If I can create them at run time, do you have some same code.

procedure SomeThread.Execute;
var
  HttpCli: THttpCli;
begin
  HttpCli := THttpCli.Create(nil);
  // set properties as wanted
  // assign event handlers here
  // connect
  HttpCli.CtrlSocket.MessagePump; // will break if WM_QUIT
  HttpCli.Free;
end;

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Tuesday, October 25, 2005, 08:56, Nick wrote:

 Hi there,

 I guess it could mean any component really, but I am looking at
 using HttpCli in a project that works with threads, to do with
 downloading. Now the user can specify 1-4 threads, as each thread
 needs to download things and you can't use 1 HttpCli to download two
 things at once - do I have to drop 4 HttpCli components on the form or
 can I create them at run time?

 If I can create them at run time, do you have some same code.
 Also does this also mean I can do this thing with other components
 (non-visual components like HttpCli)

 Regards
 Nick

-- 
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] Using HTTPCli in threads

2005-10-25 Thread Wilfried Mestdagh
Hello Nick,

if you execute a component in thread context taht need a message pump
(like TWSocket) then you have to pump messages. TWSocket has this on
board, so that's the proposed method.

The message pump (you can write your own of course) I proposed will
break his loop if a WM_QUIT message arrive. So to stop the thread you
have to post a WM_QUIT message to the window.

Depending on the application you wants to do you eventually make your
own message queue or hidden window inside your thread and do what you
wants.

note that you dont need thread if intention is only to have a couple of
components. You normally only need thread if you have to execute a
lengthy process yoruself.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Tuesday, October 25, 2005, 20:12, Nick wrote:

 Great :-)
 That all made sense except this line
 HttpCli.CtrlSocket.MessagePump; // will break if WM_QUIT

 What does that mean / do?

 Thanks a lot.

 Regards
 Nick

 Hello Nick,
 
 things at once - do I have to drop 4 HttpCli components on the form or
 can I create them at run time?
 
 If you drop themon a form then they are created and so will operate in
 main thread context.
 
 and you can't use 1 HttpCli to download two
 things at once
 
 No but you can use 4 HttpCli in the same thread doing 4 different
 downloads. You dont need thread to have multiple components doing the
 same, all work is done in background while your program can do other
 things. Note that you can use same event handlers for all the
 components.
 
 If I can create them at run time, do you have some same code.
 
 procedure SomeThread.Execute;
 var
  HttpCli: THttpCli;
 begin
  HttpCli := THttpCli.Create(nil);
  // set properties as wanted
  // assign event handlers here
  // connect
  HttpCli.CtrlSocket.MessagePump; // will break if WM_QUIT
  HttpCli.Free;
 end;
 


-- 
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] finding a local domain

2005-10-21 Thread Wilfried Mestdagh
Hello Francois,

 I would say: install a DNS server. There are free one.

A customar of me found another solution. He did not wanted to install a
DNS server (donno wy), but added an entry in the RAS dialup settings for
a local domain. This works also, the SMTP server got a 'domain not
found' from the ISP DNS server, then tryed to connect with the RAS
settings, witch sayed it was a local IP on the LAN.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Saturday, October 15, 2005, 17:15, Francois PIETTE wrote:

 Maybe the only workaround is write a DNS server ?

 I would say: install a DNS server. There are free one.
 Of course you may write one using ICS. Probably a lot of work.

 Or can you specify in windows several DNS servers?

 Yes, you can specify several. Go to your network properties, select IP
 protocol, select properties,  select advanced, select DNS. You have the
 parameters. You can setup several DNS servers and other options.

 Contribute to the SSL Effort. Visit
 http://www.overbyte.be/eng/ssl.html
 --
 [EMAIL PROTECTED]
 The author for the freeware multi-tier middleware MidWare
 The author of the freeware Internet Component Suite (ICS)
 http://www.overbyte.be



 - Original Message - 
 From: Wilfried Mestdagh [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Saturday, October 15, 2005 5:00 PM
 Subject: Re: [twsocket] finding a local domain


 Hello Francois,

 The problem is an MX query problem, isn't it ?

 Yes. Until now I delivered the server only to customars who have their
 own DNS server. I tell them to add an entry in the hosts file of the
 machine of their mail server with the IP address of my server pointing
 to the new domain, and to add an MX record with this domain to their DNS
 server. No problem until now.

 No I have 2 without DNS server, dont know if their is a workaround :(

 Maybe again example to clarify:

 suppose my LAN. I have no NT server here, only workstations, so also not
 a DNS server. I called my workgroup 'wilfried.internal', run an SMTP
 server on a machine called 'mail'. On another machine called 'sms' I run
 the other mail server. I make an entry in the host file of 'mail'
 'sms.wilfried.internal' with the IP of machine 'sms'.

 Now I want the mail server (on machine 'mail') to have mail for
 @sms.wilfried.internal delivered to the smtp server
 'sms.wilfried.internal'.

 I use now Hermes to test this, but the MX problem is 'the' problem, it
 can never find the 'sms.wilfried.internal' domain :( Unles there is some
 workaround.

 Maybe the only workaround is write a DNS server ? If this is the only
 workaroun then should this one be also a DNS client to lookup in the
 other DNS server(s) ? Or can you specify in windows several DNS servers?
 Because then it is probably a more simple server... Sorry I'm not an IT
 guy so I dont know very mutch about this stuff :(

 ---
 Rgds, Wilfried
 http://www.mestdagh.biz

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


Re: [twsocket] Socket - streams

2005-10-19 Thread Wilfried Mestdagh
Hello Werner,

If you data has a terminating character then you can use lineMode. Then
OnDataAvailable will only fire when thes character(s) are received and
you have all your data at ones.

If not it will arrive in many chunck, or datapackets can even be
concatenatied. Thats nature of TCP.

 Now, I'm using CliSocket.ReceiveStr to recieve data and put this
 in a buffer until all data is read

That is the right way to do if you dont have terminating characters.
Better is to use Receive, then you save an extra copy to a string.

---
Rgds, Wilfried [TeamICS]
http://www.mestdagh.biz

Wednesday, October 19, 2005, 10:18, Werner wrote:

 Hi,

 Does twSocket has a method to use streams
 I want to recieve some data in a TStringStream

 Now, I'm using CliSocket.ReceiveStr to recieve data and put this in a buffer 
 until all data is read
 I wonder if I can read all data in one piece by using streams?

 Thanks for any suggestions
 Werner

-- 
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] Socket - TimeOut

2005-10-19 Thread Wilfried Mestdagh
Hello Werner,

 so far I've red that after the connect,
 onDataAvailable will fired direct, but is this when also when no data comes
 in?

That was the case on NT4 and on W2K, never checked it on XP. But I
should nor rely on this. Just send your data in OnSessionConnected and
set a timer. When OnDataAvailable fires with data you destroy the timer.
When Timer expire you close the connection.

Or even better: create the timer when you connect, then yoiu have
timeout for the whole cycle.

Note that timers are not unlimited resources.

---
Rgds, Wilfried [TeamICS]
http://www.mestdagh.biz

Wednesday, October 19, 2005, 13:05, Werner wrote:

 Thank,

 Thanks, I'll check the receive function

 An other Q. about TimeOut
 After connect to the server, I send a string 'SENDDATA'
 In OnDataAvailable, i check for incoming data, but when no data arives, then
 I want to close the connection.
 Now I'm using a separate timer to check this.
 Is there an other way to do this, so far I've red that after the connect,
 onDataAvailable will fired direct, but is this when also when no data comes
 in?

 Thanks
 Werner




 - Oorspronkelijk bericht - 
 Van: Wilfried Mestdagh [EMAIL PROTECTED]
 Aan: ICS support mailing twsocket@elists.org
 Verzonden: woensdag, oktober 19, 2005 10:46
 Onderwerp: Re: [twsocket] Socket - streams


 Hello Werner,

 If you data has a terminating character then you can use lineMode. Then
 OnDataAvailable will only fire when thes character(s) are received and
 you have all your data at ones.

 If not it will arrive in many chunck, or datapackets can even be
 concatenatied. Thats nature of TCP.

  Now, I'm using CliSocket.ReceiveStr to recieve data and put this
  in a buffer until all data is read

 That is the right way to do if you dont have terminating characters.
 Better is to use Receive, then you save an extra copy to a string.

 ---
 Rgds, Wilfried [TeamICS]
 http://www.mestdagh.biz

 Wednesday, October 19, 2005, 10:18, Werner wrote:

  Hi,

  Does twSocket has a method to use streams
  I want to recieve some data in a TStringStream

  Now, I'm using CliSocket.ReceiveStr to recieve data and put this in a
 buffer until all data is read
  I wonder if I can read all data in one piece by using streams?

  Thanks for any suggestions
  Werner

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


Re: [twsocket] AN: Google Translation Interface

2005-10-19 Thread Wilfried Mestdagh
Hello David,

Looks very nice :) Works fine in XP, but gives AV's in NT4. Did not tryed
on other OS.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Wednesday, October 19, 2005, 19:06, David A. G. wrote:

 Hello all

 I made a beautiful interface for the Google language translation service
 (using HTTPcli).
 It is free, you can download and use it for free.

 http://www.mcrenox.com.ar/downloads/gtrans.exe

 I would like to hear for comments and suggestions.
 Thanks,

 David Aguirre Grazio
 www.mcrenox.com.ar


-- 
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] Does ICS support ...

2005-10-18 Thread Wilfried Mestdagh
Hello Jack,

I was just editing this faq whitch could answer one of your questions:

[Author]
Marco van de Voort
[Email]
[EMAIL PROTECTED]

[Answer] Since there seem to be quite some confusion about the extend of
fixes FPC needs, I made a ICS/FPC status page, that explains the needed
changes, reasons and versions:

  http://www.stack.nl/~marcov/ics.html

Since the fpc port is only available on CVS, I quickly zipped it, and
put it at

  http://www.stack.nl/~marcov/icsfpc.zip

---
Rgds, Wilfried [TeamICS]
http://www.mestdagh.biz

Tuesday, October 18, 2005, 00:17, Jack wrote:

 Hello all,

 I have a few questions about what ICS supports and doesn't support:

 - Does ICS support Linux (Kylix)?
   There are a few versions of ICS for various versions of Kylix.
   I'm not sure how well ICS works on Linux. I remember seeing
   some discussions regarding the different mechanism of signaling
   and messaging between Windows and Linux. I'm not sure if that
   means that there are still issues?

 - Does ICS support FreePascal?
   I saw some sporadic mentioning of FreePascal in ICS archive
   but I didn't get an impression that FreePascal is supported.

 The reason I'm asking is that I have a Delphi application that
 I have to partially port (or rewrite in C/C++) to Linux and MacOS
 (MacOS X and earlier versions of MacOS) Delphi definitely doesn't
 do that. I looked at FreePascal and Lasarus. They both claim
 to support all of Windows/Linux/MacOS-es. Because the functionality
 involves socket, I'm hoping that I can use ICS...

 -- 
 Best regards,
 Jack


-- 
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] Finding the DNS server for a domain.

2005-10-16 Thread Wilfried Mestdagh
Hello Eric,

Check out DnsQuery component, I think that's what you need.

---
Rgds, Wilfried [TeamICS]
http://www.mestdagh.biz

Saturday, October 15, 2005, 23:47, Eric Montréal wrote:

 Hi,

 I'm trying to find the DNS server associated with a domain name.

 One way to go would be to do a full Whois query and analyse the result
 but that's a bit messy
 since answer format is not standard and doing lots of Whois queries is
 usually considered an abuse.

 Is there a better way to do it ?

 Thanks in advance ...

 Eric.

 Example :
 --
 if I query 'cbc.ca', I would like to get the DNS servers associated with
 it :

 either an IP list (here : 159.33.1.51, 207.181.89.2, 207.181.89.3, 
 209.226.175.236,209.226.175.237)
 or a list of DNS server names (here : ns.cbc.ca, ns1.nbc.netcom.ca, 
 ns2.nbc.netcom.ca, ns5.bellnexxia.net, ns6.bellnexxia.net)





-- 
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] finding a local domain

2005-10-15 Thread Wilfried Mestdagh
Hello,

Is it possible to find a local domain without a DNS server ?

I give example:
I have written (with ICS of course :) an SMTP server but difference is
that there are not email clients connect to but mobile GSM. The SMS
mail server runs on a particular machine, and that IP address is added
into the DNS server.

For the local SMTP mail server there is no problem to find in that case.

But what if there is no local DNS server ? Is it then possible for the
mail server to find for a particular domain the machine where the other
srever is running on ? Any idea's ?

--
Rgds, Wilfried
http://www.mestdagh.biz

-- 
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] finding a local domain

2005-10-15 Thread Wilfried Mestdagh
Hello Francois,

 The problem is an MX query problem, isn't it ?

Yes. Until now I delivered the server only to customars who have their
own DNS server. I tell them to add an entry in the hosts file of the
machine of their mail server with the IP address of my server pointing
to the new domain, and to add an MX record with this domain to their DNS
server. No problem until now.

No I have 2 without DNS server, dont know if their is a workaround :(

Maybe again example to clarify:

suppose my LAN. I have no NT server here, only workstations, so also not
a DNS server. I called my workgroup 'wilfried.internal', run an SMTP
server on a machine called 'mail'. On another machine called 'sms' I run
the other mail server. I make an entry in the host file of 'mail'
'sms.wilfried.internal' with the IP of machine 'sms'.

Now I want the mail server (on machine 'mail') to have mail for
@sms.wilfried.internal delivered to the smtp server
'sms.wilfried.internal'.

I use now Hermes to test this, but the MX problem is 'the' problem, it
can never find the 'sms.wilfried.internal' domain :( Unles there is some
workaround.

Maybe the only workaround is write a DNS server ? If this is the only
workaroun then should this one be also a DNS client to lookup in the
other DNS server(s) ? Or can you specify in windows several DNS servers?
Because then it is probably a more simple server... Sorry I'm not an IT
guy so I dont know very mutch about this stuff :(

---
Rgds, Wilfried
http://www.mestdagh.biz

-- 
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] finding a local domain

2005-10-15 Thread Wilfried Mestdagh
Hello SubZ,

 If you need to use domains in a LAN with no DNS server, you can try dynamic
 DNS providers such as dyndns.org or no-ip.com. These can point a virtual IP
 to a dynamic DNS.

But not MX record to a private IP :( Their forms just does not accept
it.

---
Rgds, Wilfried
http://www.mestdagh.biz

-- 
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] finding a local domain

2005-10-15 Thread Wilfried Mestdagh
Hello Arno,

 Forget it, it is shareware.

   Could not find a freeware one also.
   I really thought this would be a sooo simple to solve problem :(

---
Rgds, Wilfried
http://www.mestdagh.biz

-- 
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] finding a local domain

2005-10-15 Thread Wilfried Mestdagh
Hello Francois,

 I would say: install a DNS server. There are free one.

Thanks, I think this is only solution. Thanks to all for advice .

---
Rgds, Wilfried [TeamICS]
http://www.mestdagh.biz

-- 
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] Socket server overhead

2005-10-08 Thread Wilfried Mestdagh
Hello Werner,

The component itself will take about 2 KB of memory. A listening socket
(is a socket in rest) will take about 4 KB (nonpaged) memory. A data
socket (if a client is connected) around 8 KB (nonpaged) because it is
sending and receiving.

As for other recources like CPU load etc, it is depending on amount of
data and network speed, but since data is go/come from a serial device I
should not worry about this.

So I think a thread will be overkill.

---
Rgds, Wilfried
http://www.mestdagh.biz

Saturday, October 8, 2005, 09:53, Werner wrote:

 Hi,

 I have an application that continueous (every 500ms) have contact
 with a machine by rs232. Main thread.
 I want to send some information by socket when an external program ask this.
 So this program must also listen as a server socket.

 My question: 
 when a server socket is in listening mode, does it take a lot of
 resources ?, would it be best to put this in a thread with low
 priority?, but if I do this, will the communication with the rs232 not
 take all the attention, so the thread with low priority will not work.

 Any response on this would be great.
 Thanks
 Werner

-- 
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] Socket one to one

2005-10-08 Thread Wilfried Mestdagh
Hello Werner,

You always need a listening socket to accept inbound connections. When a
client connect you accept/dup the client to a data socket. Server stay
listening. You can use a normal TWSocket as server and handle the
creation of data sockets, but then you are just re-inventing
TWSocketServer who does that for you. You can set MaxClients to 2 if
needed.

Note that I'm talking about TCP. If you use UDP then you can do listen /
send / receive with only 1 socket. But ICP is reliable the other not.

---
Rgds, Wilfried
http://www.mestdagh.biz

Saturday, October 8, 2005, 10:02, Werner wrote:

 Hi,

 Is it possible to have a socket connection from client to client ?
 Because I need only a 1 to 1 connection, I don't need a server
 socket who is able to have multiple clients comming in.

 Is there a specific whay to have 1 to 1 connection. ?
 Has it any advantages not using serverSocket and only 2
 clients-socket if this is possible

 Thanks 
 Werner

-- 
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] Sync THttpConnection derivative

2005-10-06 Thread Wilfried Mestdagh
Hello sz,

SocketSpy will show the sent/received data. You can see it in hex-ascii
if click right and choose debug or something. As Francois say,
messageBox will stop at first null, but you can use WriteLn, it does
not.

---
Rgds, Wilfried
http://www.mestdagh.biz

Thursday, October 6, 2005, 10:01, Fastream Technologies wrote:

 Hi All!

 Per Francois' private reply, I coded the following for my problem:

 function TWebConnection.SendSync(Data: PChar; DataLen: Integer): integer;
 begin
 MessageBox(0, Data, Data, MB_OK); // for debug

 Pause();

 Result := WSocket_send(HSocket,
 Data,
 DataLen,
 0);

 Resume();
 end;

 Now, even though the MessageBox shows the correct ASCII/HTML data with
 header, the socket shows garbage with SocketSpy:

 06.10.2005 10:54:14 Connection Opened

 06.10.2005 10:54:14 From Local

 GET /index.php HTTP/1.1..Host: localhost:81..User-Agent: Mozilla/5.0
 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511
 Firefox/1.0.4..Accept:
 text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5..Accept-Language:
 en-us,en;q=0.5..Accept-Encoding: gzip,deflate..Accept-Charset:
 ISO-8859-1,utf-8;q=0.7,*;q=0.7..Keep-Alive: 300..Connection:
 keep-alive..Referer: http://localhost:81/

 06.10.2005 10:54:21 From Remote

 °S»...¹..à..Dæ..Dë..İæ...à..øü!.[½.°S».`1».o1».Ê.

 Any idea why this happens?

 Best Regards,

 SubZ

 - Original Message - 
 From: Fastream Technologies [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Wednesday, October 05, 2005 3:46 PM
 Subject: [twsocket] Sync THttpConnection derivative


 Hello,

 I know most of you are very inclined to say that sync is no good! but it
 is not that simple. I have licensed code from BPDX.com for ISAPI and ISAPI
 filters andt hese units (more than 100k!) need to read, write and alter
 header or an existing THttpConnection derivative class. Starting with
 writing, I wrote the below function:

 function TWebConnection.SendSync(Data: PChar; DataLen: Integer): integer;
 var
Count: integer;
 begin
if FTerminated then
begin
Result := 0;
Exit;
end;

fDataLen := DataLen;
fTotalSentDataLen := 0;
//OldDataAvailable := FOnDataAvailable;
//OldSendData := FOnSendData;
//OldDataSent := FOnDataSent;
FOnDataAvailable := InternalDataAvailable;
FOnSendData := ConnectionSendDataISAPI;
FOnDataSent := nil;
DoneFlag := false;

ISAPIDownloadPauseDelay;

Count := Send(Data, DataLen);
Result := Count;

if (Result = 0) or FTerminated then
begin
Result := 0;
Exit;
end;

if WaitUntilReady(DoneFlag)  0 then
Result := 0
else
begin
DataSent := DataSent + Count;
FOnDataAvailable := nil;
FOnSendData := nil;
FOnDataSent := nil;
end;
 end;

 InternalDataAvailable, and WaitUntilReady are the same as Francois'.

 procedure TWebConnection.ConnectionSendDataISAPI(Sender: TObject;
 BytesSent:
 Integer);
 begin
fTotalSentDataLen := fTotalSentDataLen + BytesSent;

if fTotalSentDataLen = fDataLen then
DoneFlag := true;
 end;

 So far so good but when I launch many client threads to the PHP5ISAPI.dll
 script, in a few seconds it gives access violation in kernel32.dll! I
 think
 considering also the logic of ISAPI filters, we still need sync functions
 in
 parallel. Do you see the bug above?

 Regards,

 SubZ

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


Re: [twsocket] [tsyncsmtpcli] Problem sending email to Exchange2000server

2005-10-05 Thread Wilfried Mestdagh
Hello,

 1. using a sniffer (look for Ethereal) check for what is sent through

Or SocketSpy (user made).

 No need. I think this is mainly due to some protocol requirements, not

Or some email header. Some companies are 100% relying on their spam
filters, specially the ones who have spam filters that check the email
headers on 100% correct to decide if it is spam or not.

---
Rgds, Wilfried
http://www.mestdagh.biz

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

2005-10-03 Thread Wilfried Mestdagh
Hello Robert,

If I understeand whell it seems that you receive a particular packet
double ?  This is impossible with TCP.

First of all check if it is the sender or the receiver that fails. You
can easy check this with SocketSpy where you can log the traffic between
them.

If it is receiver, I suggest you log in OnDataAvailable. To be very sure
of message pump usage (unless you are 100% sure no object is called that
use it) you can also increment / decrement a counter on enter / leave of
the event and log it also.

---
Rgds, Wilfried
http://www.mestdagh.biz

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

2005-10-03 Thread Wilfried Mestdagh
Hello Robert,

 I have, not only in the server, in the client also.
 And the logs show that the client has sent the right
 message (the 98th), the server has got it as the 98th
 message, but it contains exactly the 97th.

So there is something wrong between the point where the client log it
and the point where the server log it. Please veryfy then with
SocketSpy.

---
Rgds, Wilfried
http://www.mestdagh.biz

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

2005-10-03 Thread Wilfried Mestdagh
Hello Robert,

 But i suspect maybe there is something 'wrong' in
 server's message pump (i am using ics messageloop).

It is very basic, cannot go mutch wrong with it. I hope it is only
called in the Execute method of your thread ?

 Other question: what is exactly 'IsClient' do?

Sorry I dont understeand what you mean ;(

---
Rgds, Wilfried
http://www.mestdagh.biz

-- 
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] BgException when a tcp client application is started by another application

2005-09-29 Thread Wilfried Mestdagh
Hello Jack,

 That's actually a print out of my BgException event handler :)

I understeand it now that I read all mails on this topic :)

---
Rgds, Wilfried
http://www.mestdagh.biz

-- 
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] SMTP server adding personalized mail headers

2005-09-28 Thread Wilfried Mestdagh
Hello,

I need to add in a special SMTP server some headers in special mails, so
that users can easy classify them with rules in their email reader.

I see that many programs add headers and all are prceided with X-, like:
  X-Text-Classification: normal
  X-POPFile-Link: http://mail:8080/jump_to_message?view=4479

Is this normal / best way to do ? If so I think to have domain name in
it to be exclusive. Any advice is welcome of course.

--
Rgds, Wilfried
http://www.mestdagh.biz

-- 
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] BgException when a tcp client application is started by another application

2005-09-28 Thread Wilfried Mestdagh
Hello Jack,

What is the offending line of code ?
I looked into the source and there is no exception starting with
'bgException' !

---
Rgds, Wilfried
http://www.mestdagh.biz

Wednesday, September 28, 2005, 20:20, Jack wrote:

 Hello Francois and all,

 I have a TCP client application that runs just fine by itself,
 meaning, starts directly from Windows Explorer, or Start Menu.
 However, when the application is started by another application,
 I always get this errpr:

 BgException: EConvertError: Invalid argument to date encode

 Then the session is closed with  ErrCode 0.

 No matter how it's started (ShellExecute, or CreateProcess, etc.)
 it always happens. I also tried starting from a .NET application
 and a Delphi application, same error. Any ideas?

 -- 
 Best regards,
 Jack


-- 
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] Webinterface and PHP

2005-09-27 Thread Wilfried Mestdagh
Hello Igor,

I dont think there are variables moved to private section because that
should break backward compatibility.

---
Rgds, Wilfried
http://www.mestdagh.biz

Monday, September 26, 2005, 19:49, Igor Pokorny wrote:

 Hello friends,
 Back to the history...
 I tried today to get running Sven Schmits's Webinterface component.
 Browsing the archive I have found four years old messages only:-(
 Changing in a component a couple of private variables of THHPsrv to
 properties and correcting some errors in a code I was able to get the
 component works...
 The only question... Have been some variables in THHPsrv made private
 in last four years (no notice about it) or I miss something ?

 Regards

 Igor

-- 
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] gphttpproxy trouble

2005-09-24 Thread Wilfried Mestdagh
Hello Sebastien,

Clicking right or left in the browser has nothing to do with the proxy.
But I dont understeand, if you click right on an URL then there is no
navigation, but a popup menu ?

---
Rgds, Wilfried
http://www.mestdagh.biz

Thursday, September 22, 2005, 23:36, Sebastien MAHIEUX wrote:

 Hello,

 I have downloaded few days ago, the gphttpproxy 2.0 with the demo included.
 The program works with Internet Explorer 6.0.

 However, when i launch a search in google and right click on a find
 result, I have a HTTP 404 Not Found. If I try a left click on the same
 result, there is no problem.

 Have you already found this problem before ?

 Sebastien

-- 
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] Connecting and sending in a thread

2005-09-21 Thread Wilfried Mestdagh
Hello Jacco,

 I'm not that familair with building multi-threaded applications, I

But are you sure you neec multi threading ? Can you give reason wy you
think it should be or tell something more about your application. You
can easy have honderts of connections running in 1 thread (main thread).

 When I connect in the main
 thread and create a thread in the onsessionconnect event, it works.

Not good. You have to TreadAttach the socket if needed. Or create a
thread for the lengty work you want to do (if this is the reason).

 But when I terminate the thread and want to reconnect in the main
 thread, I get a Winsock error (10022).

10022 is 'invalid argument', can be whatever wrong parameter or pointer.
Never seen this error...

 So I have got it working as an object in the main thread. Can I put
 all the code in the thread execute part?

Think very object oriented. for example make an object TConnection
whitch will do all the work. TConnection has properties and events. If
TConnection wants to tell somethign (eg data) to the application it can
fire an event. When you create TConnection it should do all his job
independant of the application. When it works without bug all is fine.

All components should be created in TConnection.

When you then create the TConnection to an Execute method of a thread
you will have threded code if you fulfill some things. All events you
can pass to main application by posting a message. Same for all methods.
Since you only have to change public things it is only minor work.

But first let's consider if you really need multithreading !

---
Rgds, Wilfried
http://www.mestdagh.biz

Wednesday, September 21, 2005, 15:30, Jacco Bezemer wrote:

 Hi Wilfried,

 I'm not that familair with building multi-threaded applications, I
 gave it a try but I didn't get it working. When I connect in the main
 thread and create a thread in the onsessionconnect event, it works.
 But when I terminate the thread and want to reconnect in the main
 thread, I get a Winsock error (10022).

 So I have got it working as an object in the main thread. Can I put
 all the code in the thread execute part?

 Thanks in advance,
 Jacco

 On 9/21/05, Wilfried Mestdagh [EMAIL PROTECTED] wrote:
 Hello Jacco,

 There is no difference if you wants to do in a thread if all your code
 is thread safe, and you need a message pump in the thread.

 The most easy way is to develop / test all in main thread, so that you
 know that eventually bugs are not because of threaded code bugs. To do
 so you make a separate object where all code is in that you need.

 Later when all is ready you just create / free your object in the
 threads execute method. To have a message pump you can use message pump
 from TWSocket.

 ---
 Rgds, Wilfried
 http://www.mestdagh.biz

 Wednesday, September 21, 2005, 12:54, Jacco Bezemer wrote:

  Hi,

  I want to connect (and reconnect) within a thread and send XML data
  within that same thread.

  How do I accomplisch this? Can someone help me on this?

  I'm using Delphi 7.

  Thanks in advance,
  Jacco

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


Re: [twsocket] [tsyncsmtpcli] Problem sending email to Exchange 2000server

2005-09-19 Thread Wilfried Mestdagh
Hello Francois,

 Verify that OE use SMTP and don't use IMAP4.

Is IMAP also used to send emails ? I have the problem that M$ Echange
complains it will not relay, but sending with outlook to same
destination it works. So probably this is the reason...

---
Rgds, Wilfried
http://www.mestdagh.biz

-- 
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] abnormal winsock behaviour by firewall

2005-09-16 Thread Wilfried Mestdagh
Hello Francois,

 10053 is connection aborted. I guess Norton is listening on all
 ports and abort the connections he
 is configured to deny.

Yes I think so too. I think this is totally wrong, most other firewalls
give a 10060 (timeout) whitch is also wrong, but at least is gives a TCP
connection a more or less normal behaviour. Norton let's you connect
without error which is very abnormal, so I hereby clasify the product as
'not good' :)

---
Rgds, Wilfried
http://www.mestdagh.biz

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


<    1   2   3   4   5   6   >