🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: UDP socket

#1150
From: Remy Lebeau (TeamB)
Date: Thu, 29 Mar 2007 23:15
30 lines
1809 bytes
"Kresten Tolstrup" <kt@danphone.com> wrote in message
news:4609120b$1@newsgroups.borland.com...

> Does anyone have a simple example, that shows how
> to use TUdpSocket. I use C++ builder 6.0.

Borland's socket components for CLX are horribly written.  I strongly
advise you to not use them at all.  There are plenty of third-party
components that are much better.

> When I try to send anything I receive errorcode 10038.

    WSAENOTSOCK (10038)

    Socket operation on non-socket.

    An operation was attempted on something that is not a socket.
Either the socket handle parameter did not reference a valid socket,
or for select, a member of an fd_set was not valid.

> I setup the local and remote port numbers, then I call connect(),
> I have also tried with open(), after that I setup remote host and
> call SendBuf, then the Event UdpSocketError is called.

You have to specify the Host before you call Open() or Connect().  You
can't set it afterwards.


Gambit
Technical Details
Message-ID: <460c3af9$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <4609120b$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,eda79d322010114f
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <4609120b$1@newsgroups.borland.com>
Subject: Re: UDP socket
Date: Thu, 29 Mar 2007 15:15:57 -0800
Lines: 32
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.34.171
Message-ID: <460c3af9$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1175206649 75.83.34.171 (29 Mar 2007 15:17:29 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail