🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #898

Re: Important - Need help testing new Indy version and fast!

#898
From: Remy Lebeau (TeamB)
Date: Mon, 20 Aug 2007 17:44
54 lines
3001 bytes
"Paul at NCF" <notplmacca@clara.co.uk> wrote in message
news:46c70d07$1@newsgroups.borland.com...

> I had to remove include lines for AntiFreeze headers

Please be more specific.  What exactly did you remove, and from where
exactly?

> The server and client test harnesses are working (including
> receiving SysLog data from my wireless ADSL router),
> however I notice a difference in behaviour for two different
> send calls.

What calls are you referring to exactly?  Where are you seeing the data
appear?  Again, you need to be more specific.

> With SysLog Client rebuilt only (and using Indy9 Server) the
> data received is:

Since there is no such output being generated by Indy, I have to assume that
you are formatting the message data into your own string value.  Please show
your actual code so we can see what fields you are using.

> This send leaves the host name blank:

You are not assigning anything to the TIdSysLogMessage::Hostname property in
your code.  Looking at the source code for TIdSysLogMessage, I see that it
tries to assign a default value to that property inside of the
TIdSysLogMessage::InitComponent() method.  However, something I observed
last week was that the InitComponent() method is not always called correctly
under C++.  I have no idea why yet.

> UDP Client & Server Components, I get the following compile errors.
> Have all these interfaces changed?

Yes, which you can see if you look at the declarations in the header files.

The send/receive methods need some explanation.  You can't pass raw memory
buffers to Indy anymore, mainly due to the .NET support.  In this particular
case, you will have to wrap your data into a TIdBytes.  For sending data,
you can use RawToBytes().  For receiving data, you can use BytesToRaw().
For example:

    IdUDPClient->SendBuffer(RawToBytes(Udata, Ulength));

    TIdBytes buf;
    buf.Length = DataSize;
    DataSize = IdUDPClient->ReceiveBuffer(buf, Wait);
    BytesToRaw(buf, Data, DataSize);
    RxBuf->Ulength = DataSize;


Gambit
Technical Details
Message-ID: <46c9d309@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <46bd01a2$1@newsgroups.borland.com> <46bec059$1@newsgroups.borland.com> <46c70d07$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,e3c7f9e2088e8b5
X-Google-Attributes: gid11508e,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <46bd01a2$1@newsgroups.borland.com> <46bec059$1@newsgroups.borland.com> <46c70d07$1@newsgroups.borland.com>
Subject: Re: Important - Need help testing new Indy version and fast!
Date: Mon, 20 Aug 2007 10:44:45 -0700
Lines: 56
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 75.83.29.61
Message-ID: <46c9d309@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1187631881 75.83.29.61 (20 Aug 2007 10:44:41 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail