🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.internet.socket
6 messages
6 total messages Started by Emmanuel Thu, 29 Nov 2007 14:30
BUG for TClientSocket and TClientDataSet
#592
Author: Emmanuel
Date: Thu, 29 Nov 2007 14:30
20 lines
1303 bytes
Whenever using a TClientSocket and TClientDataSet (Socket Server)
at the same time
eg:

ClientSocket->Open();
......
ClientDataSet->Open();

error must be occured


class EvariantInvalidArgError with message 'Invalid argument'
class ESocketConnectionError with message 'Error reading form socket'

if ClientSocket don't open, this is no error


How can I solve it???????

Help
Re: BUG for TClientSocket and TClientDataSet
#595
Author: Remy Lebeau (TeamB)
Date: Fri, 30 Nov 2007 03:32
40 lines
2213 bytes
"Emmanuel" <emmanuel@erphk.com> wrote in message
news:474ecbea@newsgroups.borland.com...

> Whenever using a TClientSocket and TClientDataSet
> (Socket Server) at the same time
> eg:
>
> ClientSocket->Open();
> ......
> ClientDataSet->Open();
>
> error must be occured
>
> class EvariantInvalidArgError with message 'Invalid argument'

There is no way to track that down without seeing a stack trace leading up
to the exception being raised.

> class ESocketConnectionError with message 'Error reading form socket'

That exception is only raised when the socket API recv() function does not
return as many bytes as were asked for during a reading operation.  Which,
frankly, is really stupid on TClientDataSet's part, because that is not the
proper way to handle socket data.  recv() is never guaranteed to return all
of the requested bytes in one call.  If the return value is > 0 and more
bytes are expected, recv() is supposed to be called again.  But
TClientDataSet does not do that.

> if ClientSocket don't open, this is no error
>
> How can I solve it???????

Don't open them at the same time, obviously.  Without knowing more about why
the EVariantInvalidArgError is being raised, all I can guess is that both
components are trying to use the same port at the same one, and one of them
is going to fail as a result.


Gambit
Re: BUG for TClientSocket and TClientDataSet
#596
Author: Emmanuel
Date: Fri, 30 Nov 2007 05:31
24 lines
1722 bytes
>
> Don't open them at the same time, obviously.  Without knowing more about 
> why
> the EVariantInvalidArgError is being raised, all I can guess is that both
> components are trying to use the same port at the same one, and one of 
> them
> is going to fail as a result.
My Program is that
Firstly open the TClientDataSet by SocketServer(port 211) to machine A, 
there is no problem
Secondly Open a TClientSocket connect to  other machine B (Remote port is 
9000) , there is also no problem,
and then communicate to B,and get data from machine B,  there is also no 
problem
after that update or Get data by TClientDataSet from/to machine A, Error is 
occured

I have also think may be the local port problem, but how can I set the local 
port for TClientDataSet,and SocketConnection?

>
> Gambit
>
> 
Re: BUG for TClientSocket and TClientDataSet
#597
Author: Remy Lebeau (TeamB)
Date: Fri, 30 Nov 2007 06:29
21 lines
1579 bytes
"Emmanuel" <emmanuel@erphk.com> wrote in message
news:474f9ef5@newsgroups.borland.com...

> after that update or Get data by TClientDataSet from/to
> machine A, Error is occured

Again, there is no way to diagnose that with the limited information you
have provided so far.

> I have also think may be the local port problem

TClientDataSet uses a random local port, so there shouldn't be any conflict
there.

> how can I set the local port for TClientDataSet,and SocketConnection?

You can't. They don't expose that functionality.


Gambit
Re: BUG for TClientSocket and TClientDataSet
#599
Author: Emmanuel
Date: Fri, 30 Nov 2007 09:28
27 lines
1752 bytes
you can make a simple program to test it, it must be error

"Remy Lebeau (TeamB)" <no.spam@no.spam.com> д����Ϣ����:474fadb6$1@newsgroups.borland.com...
>
> "Emmanuel" <emmanuel@erphk.com> wrote in message
> news:474f9ef5@newsgroups.borland.com...
>
>> after that update or Get data by TClientDataSet from/to
>> machine A, Error is occured
>
> Again, there is no way to diagnose that with the limited information you
> have provided so far.
>
>> I have also think may be the local port problem
>
> TClientDataSet uses a random local port, so there shouldn't be any 
> conflict
> there.
>
>> how can I set the local port for TClientDataSet,and SocketConnection?
>
> You can't. They don't expose that functionality.
>
>
> Gambit
>
> 
Re: BUG for TClientSocket and TClientDataSet
#627
Author: Emmanuel
Date: Tue, 11 Dec 2007 00:15
31 lines
1910 bytes
Too bad
"Emmanuel" <emmanuel@erphk.com> д����Ϣ����:474fd757@newsgroups.borland.com...
> you can make a simple program to test it, it must be error
>
> "Remy Lebeau (TeamB)" <no.spam@no.spam.com> д����Ϣ����:474fadb6$1@newsgroups.borland.com...
>>
>> "Emmanuel" <emmanuel@erphk.com> wrote in message
>> news:474f9ef5@newsgroups.borland.com...
>>
>>> after that update or Get data by TClientDataSet from/to
>>> machine A, Error is occured
>>
>> Again, there is no way to diagnose that with the limited information you
>> have provided so far.
>>
>>> I have also think may be the local port problem
>>
>> TClientDataSet uses a random local port, so there shouldn't be any 
>> conflict
>> there.
>>
>>> how can I set the local port for TClientDataSet,and SocketConnection?
>>
>> You can't. They don't expose that functionality.
>>
>>
>> Gambit
>>
>>
>
> 
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