Re: [twsocket] THttpCli: default webpage name

2008-05-07 Thread Tobias Rapp
DZ-Jay wrote:
 [EMAIL PROTECTED] wrote:
 If THttpCli is used to get a webpage with no document name specified,
 only directory (www.codegear.com/products) - is it possible to find out
 the default document name? Whether it be index.html or main.html or
 just some custom name specified on the webserver?
 
 This is a feature of the HTTP server:  When a document is not specified, 
 it decides which is the default resource.  There is no way for the 
 client to discover this.

Well in the case where the server performs a redirection it might be 
possible, e.g.
http://en.wikipedia.org/wiki/ - http://en.wikipedia.org/wiki/Main_Page

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


[twsocket] Sending binary data

2008-05-07 Thread Daniel Mauric
Hi,

I'm using plain TCP with TWSocket and would like to send binary data. So far 
i've been sending text and used line mode, so I wonder how to handle binary 
data.
One option would be to encode to say base64 and so still use line mode, but 
that would make data larger, so I'd prefer to send binary data directly. When 
sending I do know the size of data I'm about to send, so I guess I could use 
first few bytes to specify the length. The receiver would then use that to 
figure out how much to read till the end of the message.
This surely isn't a rare situation, so I assume there are usual ways to do it.
I would appreciate any suggestions or comments.

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


[twsocket] [OT] CodeGear sold

2008-05-07 Thread Arno Garrels
CodeGear sold to Embarcadero Technologies, source: 
http://phx.corporate-ir.net/phoenix.zhtml?c=112793p=irol-newsArticleID=1141119
and
http://www.codegear.com/about/news/embt

Interesting detail: Embarcadero Technologies itself has been bought last year 
by  
Thoma Cressey Bravo, a private equity firm, source:
http://www.embarcadero.com/news/press_releases/ThomaCressyEquityAcquisition.html
and
http://blog.robertsoft.de/

--
Arno Garrels

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


Re: [twsocket] Sending binary data

2008-05-07 Thread Angus Robertson - Magenta Systems Ltd
 I'm using plain TCP with TWSocket and would like to send binary 
 data. So far i've been sending text and used line mode, so I wonder 
 how to handle binary data.

You can emulate FTP and send the binary data on a second socket, that's
closed once it's finished.  

Or packet up your data with start and length headers, might be slightly
more secure than sending just a length alone at the start. 

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


Re: [twsocket] SMTP Client - Delete Temp files -

2008-05-07 Thread DZ-Jay
wayne forrest wrote:
 Hello,
 
 After I have successfully sent the Email I need to delete the temp Files (
 attachments );
 
 How do I know if the mail was sent OK;

After sending the message and issuing the QUIT command, the 
OnRequestDone is fired with no error with the Request = smtpQuit.

dZ.

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


Re: [twsocket] SMTP Client - Delete Temp files -

2008-05-07 Thread Arno Garrels
wayne forrest wrote:

 How do I know if the mail was sent OK;

When OnRequestDone triggers with request smtpData and no error the
mail has been sent to server sucessfully. 

Kind regards,

Arno Garrels

-
DuoData Software
Arno Garrels
Libauer Strasse 12
D-10245 Berlin Germany

[EMAIL PROTECTED]

fon  + 49  30  29 00 71 74

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


Re: [twsocket] [OT] CodeGear sold

2008-05-07 Thread Francois PIETTE
 CodeGear sold to Embarcadero Technologies

Interestingly, Embarcadero vice president - Nigel Brown - came to 
Embarcadero after more than 10 years at Borland where he headed up the 
Developer Tools business (Code Gear) in 2006. Prior to that, he was 
Vice-President-EMEA, growing it to be Borland's largest and most successful 
region in 2000-2004.

So I think Embarcadero knows exactly what they bought. This is a very 
positive signal for me.

--
[EMAIL PROTECTED]
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be



- Original Message - 
From: Arno Garrels [EMAIL PROTECTED]
To: twsocket@elists.org
Sent: Wednesday, May 07, 2008 2:58 PM
Subject: [twsocket] [OT] CodeGear sold


 CodeGear sold to Embarcadero Technologies, source:
 http://phx.corporate-ir.net/phoenix.zhtml?c=112793p=irol-newsArticleID=1141119
 and
 http://www.codegear.com/about/news/embt

 Interesting detail: Embarcadero Technologies itself has been bought last 
 year by
 Thoma Cressey Bravo, a private equity firm, source:
 http://www.embarcadero.com/news/press_releases/ThomaCressyEquityAcquisition.html
 and
 http://blog.robertsoft.de/

 --
 Arno Garrels

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

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


Re: [twsocket] small but pertinent doubt

2008-05-07 Thread João Gonçalves
Hello all,
After some experiments and some (huge) line codes, I have some updates
regarding this issue.
I adopted TcpSrv example, I'm using TWSocketServer component and associated
a new form for which client. In this way, each client updates the visual
aspect of the form accordingly. I think this is the best option!?
The results with 3 clients seems OK. I have some problems when I put the
Sleep function in a client method, because the server stays blind to
incoming data. Apart of that it is doing fine,
Just one question: TWSocktetServer property Multithreaded is used for what?
Thanks in advance
Regards
João


-Mensagem original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Em nome
de João Gonçalves
Enviada: domingo, 6 de Abril de 2008 13:37
Para: 'ICS support mailing'
Assunto: Re: [twsocket] small but pertinent doubt

Thanks for the help.
I you look into all these options and try to decide what's best.
Regards,
João

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Wilfried Mestdagh
Sent: domingo, 6 de Abril de 2008 11:05
To: ICS support mailing
Subject: Re: [twsocket] small but pertinent doubt

Hello João,

No you do not need thread to implement some flow control. First of all
you may not update visual controls from within a thread, so you have to
execute all this code in main thread context as well. Oke you can do
that by SendMessage or PostMessage.

Then if you need to display a from per client, it is the same problem.
All has to be done in main thread context. So I think you will make it
complicate if you use threads. You have to write thread safe code and do
all updates in main thread context.

So for the update of the main form table. I don't know exacly what you
are doing, but if you do as follow:

- client connect and send some data or whatever
- when data is received you temporary store it somewhere and you disable
  then enable a Timer.
- in OnTimer you update the table and delete the temporary data from
  each client.

This way table will update some time after a client, and when many
clients are updating it will wait a little for the update.

Of cours other approachs are also possible, this is just an idea. Hope
this helps.

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

Saturday, April 5, 2008, 19:33, João Gonçalves wrote:

 Let me explain why do I (think I) need a thread per client.
 I have a C++ builder app, with a main form, that has a table with the
 information of the status of several clients.
 When some client connects, it instantiates a new Form which is associated
to
 each client. I can view (and drag) this form along the main form.
 The problem is: when a client is updating it status, on the main form's
 table, if there is another client doing the same, the table goes crazy. I
 think I have to use threads in order to introduce some flow control on the
 mains form's table.
 Am I thinking straight?
 Thank you
 João 
  

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On
 Behalf Of Wilfried Mestdagh
 Sent: sábado, 5 de Abril de 2008 16:27
 To: ICS support mailing
 Subject: Re: [twsocket] small but pertinent doubt

 Hello João,

 If it is not in the list then I have to open all example files to see
 witch one. I know there is an example of running each client in
 separated thread.

 But are you sure you need a thread per client ???

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

 Saturday, April 5, 2008, 09:42, João Gonçalves wrote:

 Hello, once more thank you for your answer.
 I was referring to that list, I can't find the specific example that you
 speak. Are you referring to TcpSrv?
 Thanks
 João

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On
 Behalf Of Wilfried Mestdagh
 Sent: sábado, 5 de Abril de 2008 8:26
 To: ICS support mailing
 Subject: Re: [twsocket] small but pertinent doubt

 Hello João,

 Here http://www.overbyte.be/eng/products/ics.html#ics_apps is a complete
 discreption of all example files.

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

 Saturday, April 5, 2008, 09:15, João Gonçalves wrote:

 Hello,
 Jus tone more thing: can youn point me to that example? I can't seem to
 find
 it:-(
 Thank you,
 João

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On
 Behalf Of Wilfried Mestdagh
 Sent: sábado, 5 de Abril de 2008 0:38
 To: ICS support mailing
 Subject: Re: [twsocket] small but pertinent doubt

 Hello João,

 As far as I recall is mtSrv an older example with a listening TWSocket
 and creating data-TWSockets for the clients. So the example with
 TWSocketServer is the way to go.

 TWSocketServer is not multithread because it is not needed. It can
 handle thousands of connections in main thread. But if you want you can
 make separate thread for 

Re: [twsocket] Sending binary data

2008-05-07 Thread Wilfried Mestdagh
Hello Daniel,

It is indeed not a rare situation. Sending the length of the data first
is a good idea, I do it often. another simple option is to escape some
characters and still use lineMode. You have to escape the LineEnd
characters as whell as the escape byte. See also http://wiki.overbyte.be
for an article I wrote about sending binary data and several approach
for it.

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

Wednesday, May 7, 2008, 13:46, Daniel Mauric wrote:

 Hi,

 I'm using plain TCP with TWSocket and would like to send binary
 data. So far i've been sending text and used line mode, so I wonder
 how to handle binary data.
 One option would be to encode to say base64 and so still use line
 mode, but that would make data larger, so I'd prefer to send binary
 data directly. When sending I do know the size of data I'm about to
 send, so I guess I could use first few bytes to specify the length.
 The receiver would then use that to figure out how much to read till
 the end of the message.
 This surely isn't a rare situation, so I assume there are usual ways to do it.
 I would appreciate any suggestions or comments.

 Regards,
 Daniel Mauric

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