Article View: borland.public.cppbuilder.internet.socket
Article #5502Re: {ctNonBlocking, ctBlocking} and {stNonBlocking, stThreadBlocking}
From: Vladimir Stefanovic
Date: Sat, 14 Aug 2004 09:50
Date: Sat, 14 Aug 2004 09:50
49 lines
2823 bytes
2823 bytes
Hi,
> You need to provide more details about what exactly you are
> trying to accomplish in the first place.
I'm curently in a process of coding a monitoring and survaillance
system which monitors some LOG files for changes (on different
server PCs), then finding some patterns to appear, and finally
informing some users via SMS, Email and LAN (I made custom
messenger for LAN).
The core of the system consists of 6 independent services, and many
other config apps. Some of the services should be installed on client's
machines, for example service which waits for data to show a custom
LAN message I menioned before. Email has it's own infrastructure on
client's machines, of couurse, same as Mobile phones. All other services
are on server machines.
So there are many socket connections to be wired in propper way in
the system.
I would be delighted if I could with your assistence resolve one case
for now. This is it:
One service (client socket) has a list of IP addresses and one-string
messages (up to 100 bytes) to be sent to (server socket) PCs which
are identified by the IP.
That means - client side /simplified/:
// Communication Ports are nagotiated before
for ( int i=0; i<List->Count; i++ )
SendViaSockets ( List->GetToIP( i ), List->GetMessageToSend( i ) );
If it is of any importance - IPs can repeat in the list.
On the server side, service should receive the message and show it to
the user. I know how to show the message, but I do not know how to
receive it in propper way because of:
> What you do have to worry about in either case, however, is whether
> the full 100 bytes are accepted in one pass, or if you have to call
> SendText/Buf() multiple times when the data can't be sent in one piece.
Can you please provide me some code to start with?
Best regards,
Vladimir Stefanovic
Technical Details
Message-ID:
<411de08a@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<411d1c29@newsgroups.borland.com> <411d203b$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,4c45334fb8a0a6bb
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Vladimir Stefanovic" <spam@not.needed>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <411d1c29@newsgroups.borland.com> <411d203b$1@newsgroups.borland.com>
Subject: Re: {ctNonBlocking, ctBlocking} and {stNonBlocking, stThreadBlocking}
Date: Sat, 14 Aug 2004 11:50:26 +0200
Lines: 52
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
NNTP-Posting-Host: 213.244.194.105
Message-ID: <411de08a@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1092477066 213.244.194.105 (14 Aug 2004 02:51:06 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail