Article View: borland.public.cppbuilder.internet.socket
Article #5489Re: Send/Receive MemoryStream with sockets
From: Vladimir Stefanovic
Date: Wed, 11 Aug 2004 07:14
Date: Wed, 11 Aug 2004 07:14
50 lines
2233 bytes
2233 bytes
Hi,
Correction. In my country it was about 06:15
when I answered you so I completely missed the
point about sending modes you asked me. Sory.
This is what I wanted to accomplish:
I want to make simple email sending service.
The service itself has a container class, which
internaly is consisted of series of TStringLists,
so adding new request in the list is like this:
ToBeSent->Add ( FromAddress, FromName, Subject,
ToAddress, Body );
The main Service's OnExecute() is processing that
list something like this /simplified/:
while ( ToBeSent->Count > 0 )
{
if ( SendEmail ( FIFO ) )
TakeSomeAction(); // Remove from list, etc
else
TakeSomeOtherAction(); // LOG
}
In the meantime the TServerSocket is supposed to
receive new requests for sending and when finished
receiving one package of data (sent from one client):
while ( !EndOfFileOfOnePackage )
{
// ...
ToBeSent->Add ( FromAddress, FromName, Subject,
ToAddress, Body );
}
At that particular moment other clients which eventually
wants to send request should wait, I think.
Please help me with your oppinion.
Best regards,
Vladimir Stefanovic
Technical Details
Message-ID:
<4119c73b$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!proxad.net!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<41191a2c@newsgroups.borland.com> <4119337e$1@newsgroups.borland.com> <41199dae@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,47de5c2433cc7390 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Vladimir Stefanovic" <spam@not.needed> Sender: "Vladimir Stefanovic" <spam@not.needed> Reply-To: "Vladimir Stefanovic" <spam@not.needed> Subject: Re: Send/Receive MemoryStream with sockets Newsgroups: borland.public.cppbuilder.internet.socket X-User-Info: 213.137.116.203 X-Forwarded-For: 128.128.129.165 References: <41191a2c@newsgroups.borland.com> <4119337e$1@newsgroups.borland.com> <41199dae@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <4119c73b$1@newsgroups.borland.com> Date: 11 Aug 2004 00:14:03 -0700 X-Trace: newsgroups.borland.com 1092208443 207.105.83.66 (11 Aug 2004 00:14:03 -0700) Lines: 52 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!proxad.net!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail