🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.internet.socket
3 messages
3 total messages Started by Mike Ruskai Tue, 04 Mar 2008 21:48
TIdTCPClient write?
#485
Author: Mike Ruskai
Date: Tue, 04 Mar 2008 21:48
10 lines
1148 bytes
I think I've mostly got a handle on socket reading, but now I can't
seem to get any data out over the socket.

I've tried Write() and WriteDirect() (with TByteDynArray for the
data), with WriteBufferFlush() and WriteBufferCancel() (the latter
before the write).

Packet capture shows nothing being sent.

How can it be this difficult to simply send data over a socket?
Re: TIdTCPClient write?
#487
Author: Remy Lebeau (TeamB)
Date: Tue, 04 Mar 2008 22:14
35 lines
2030 bytes
"Mike Ruskai" <BUTthannydI@DONTearthlinkLIKE.netSPAM> wrote in message 
news:2qgrs3lmhrosjunbn1hblt6r9ajlbd4jjr@4ax.com...

> I think I've mostly got a handle on socket reading, but now
> I can't seem to get any data out over the socket.

Then you are probably not using it correctly.  Please show your actual code.

> I've tried Write() and WriteDirect()

Write() will work just fine.  Don't call WriteDirect() directly.

> (with TByteDynArray for the data)

Any particular reason why you keep using TByteDynArray instead of Indy's own 
TIdBytes type?

> with WriteBufferFlush() and WriteBufferCancel() (the latter before the 
> write).

WriteBufferFlush() does not do anything unless WriteBufferOpen() was called 
first.

> Packet capture shows nothing being sent.

Then you are not writing anything to begin with.

> How can it be this difficult to simply send data over a socket?

Because you are using Indy the wrong way, most likely.  Again, please show 
your actual code.


Gambit
Re: TIdTCPClient write?
#489
Author: Mike Ruskai
Date: Wed, 05 Mar 2008 03:06
14 lines
1625 bytes
On or about Tue, 4 Mar 2008 14:14:04 -0800 did "Remy Lebeau \(TeamB\)"
<no.spam@no.spam.com> dribble thusly:

>
>"Mike Ruskai" <BUTthannydI@DONTearthlinkLIKE.netSPAM> wrote in message 
>news:2qgrs3lmhrosjunbn1hblt6r9ajlbd4jjr@4ax.com...
>
>> I think I've mostly got a handle on socket reading, but now
>> I can't seem to get any data out over the socket.
>
>Then you are probably not using it correctly.  Please show your actual code.

It was a cerebral failure in RawToBytes().  Once I fixed that, it
writes fine.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads