🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Winsock - App Hangs after sending a few messages.

#4698
From: Bob Gonder
Date: Tue, 04 Jan 2005 17:15
18 lines
1338 bytes
>    void __fastcall TForm1::Timer1Timer(TObject *Sender)
>    {
>        char temp[100];

temp is garbage.

>        if (recv(Client, temp, 100, NULL) == SOCKET_ERROR) HandleError();

If there is no data, temp is still garbage.

>        AnsiString temp2(temp);
>        Memo->Lines->Strings[0] = temp2;

You are adding garbage to your memo.
Does that cause problems?

>    }
Technical Details
Message-ID: <5mjlt0po23co550b1r48gtcmgjd9qhe4c2@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <41da69f3$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,a0eb9df8217c6d4f
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: Re: Winsock - App Hangs after sending a few messages.
Date: Tue, 04 Jan 2005 09:15:21 -0800
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <5mjlt0po23co550b1r48gtcmgjd9qhe4c2@4ax.com>
References: <41da69f3$1@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 69.69.91.241
X-Trace: newsgroups.borland.com 1104858921 69.69.91.241 (4 Jan 2005 09:15:21 -0800)
Lines: 21
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail