Re: [twsocket] THttpCli not returning?

2011-04-12 Thread Francois PIETTE

I don't know if there's a better way


That is fine.

So the HttpCli built-in timeout is not enough?!


Only for sync calls.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] THttpCli not returning?

2011-04-12 Thread Arno Garrels
RTT wrote:
 On 11-04-2011 16:49, Francois PIETTE wrote:
 I don't know if there's a better way
 
 That is fine.
 So the HttpCli built-in timeout is not enough?!

Indeed, method Get is sync and as such has a built-in
timeout as specified with property TimeOut.

What ICS version do you use? 
Get latest ICSv7 from http://wiki.overbyte.be/wiki/index.php/ICS_Download
and see whether the problem perstists.

-- 
Arno Garrels   

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] THttpCli not returning?

2011-04-12 Thread David Lewis

Arno,

I'm running with V7 here, although possibly not the latest iteration of 
it. Is there anything recently new to this component that may affect 
this functionality?


Also, I don't have an accessible TimeOut parameter that I can set. Is 
this internal to the component only? Or is this a new feature?


Dave


On 12/04/2011 07:14, Arno Garrels wrote:

RTT wrote:
   

On 11-04-2011 16:49, Francois PIETTE wrote:
 

I don't know if there's a better way
 

That is fine.
   

So the HttpCli built-in timeout is not enough?!
 

Indeed, method Get is sync and as such has a built-in
timeout as specified with property TimeOut.

What ICS version do you use?
Get latest ICSv7 from http://wiki.overbyte.be/wiki/index.php/ICS_Download
and see whether the problem perstists.

   



--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] THttpCli not returning?

2011-04-12 Thread Arno Garrels
David Lewis wrote:
 Arno,
 
 I'm running with V7 here, although possibly not the latest iteration
 of it. Is there anything recently new to this component that may
 affect this functionality?
 
 Also, I don't have an accessible TimeOut parameter that I can set. Is
 this internal to the component only? Or is this a new feature?

I wouldn't say it's new:
Sep 17, 2009 V7.04 Arno added property Timeout, works only with synchronous
 methods!

See the list of other changes/fixes in either OverbyteIcsHttpProt.pas or
its SVN log.

-- 
Arno Garrels  


 
 Dave
 
 
 On 12/04/2011 07:14, Arno Garrels wrote:
 RTT wrote:
 
 On 11-04-2011 16:49, Francois PIETTE wrote:
 
 I don't know if there's a better way
 
 That is fine.
 
 So the HttpCli built-in timeout is not enough?!
 
 Indeed, method Get is sync and as such has a built-in
 timeout as specified with property TimeOut.
 
 What ICS version do you use?
 Get latest ICSv7 from
 http://wiki.overbyte.be/wiki/index.php/ICS_Download and see whether
 the problem perstists. 
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] THttpCli not returning?

2011-04-12 Thread Daniele Rocchi
I must say what Arno is talking about I experienced too: the built-in
timeout doesn't work (and I only do sync calls), this is why I created
an external timeout to call the Abort.

If the HttpCli component doesn't recieve anything it hangs forever.

Daniele

On 12 April 2011 09:13, Arno Garrels arno.garr...@gmx.de wrote:
 list of other changes/fixes in either OverbyteIcsHttpProt.pas or
 its SVN log.

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] THttpCli not returning?

2011-04-12 Thread Arno Garrels
Daniele Rocchi wrote:
 I must say what Arno is talking about I experienced too: the built-in
 timeout doesn't work (and I only do sync calls), 

I didn't say that. The timeout for sync methods has been added
in September 2009 and works well AFAIK. This Timeout property 
does not work with async methods like GetAsync etc..
It's easy to check by modifying i.e. the OverbyteIcsTcpSrv demo
to return nothing or incomplete responses.
Or set Timeout to 5 seconds and try to .Get something from
a non-existing IP. If you think there is a bug please provide
a reproducible test case.

-- 
Arno Garrels

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] THttpCli not returning?

2011-04-12 Thread Daniele Rocchi
I work with Delphi 7 and the Timeout has never worked for me, I don't
know if I was using it incorrectly but I was forced to put an external
timeout because of this.

Daniele

On 12 April 2011 10:05, Arno Garrels arno.garr...@gmx.de wrote:
 Daniele Rocchi wrote:
 I must say what Arno is talking about I experienced too: the built-in
 timeout doesn't work (and I only do sync calls),

 I didn't say that. The timeout for sync methods has been added
 in September 2009 and works well AFAIK. This Timeout property
 does not work with async methods like GetAsync etc..
 It's easy to check by modifying i.e. the OverbyteIcsTcpSrv demo
 to return nothing or incomplete responses.
 Or set Timeout to 5 seconds and try to .Get something from
 a non-existing IP. If you think there is a bug please provide
 a reproducible test case.

 --
 Arno Garrels

 --
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] Receive log file text

2011-04-12 Thread daniel cc
Hi,
Can someone please help me out w ith a sample of how to,
send a log (text file) from client to the server?
My connection is with ICSSLServer and ICSSSLClient.

My client opens the connection and makes sure connection is always on.
Log file is just a regular text file and not so big.
I just need to receive the log file before closing restarting the client due 
the daily reboot routine.

thanks in advance.
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] Receive contents of remote text file over SSL

2011-04-12 Thread Dimitris Botsis

Hi all,
how can i use SSLHttpCli in order to directly transfer the contents of a 
remote text file ? Which are filesize limitations for that ?

For example, I have a file :
https://www.mydomain.com/myfile.txt and want to read it directly to client.
Thank you.
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Receive contents of remote text file over SSL

2011-04-12 Thread Dimitris Botsis

Hi again,

I use the example OverbyteIcsHttpDmo. When I call the text file on my 
web server using HTTP (as in the example) then I get the contents OK.
When I use HTTPS (having added proper sslhttpcli and sslcontect 
components) the request is sent but don't get any contents back.

Any ideas ?

On 12/4/2011 2:38 μμ, Dimitris Botsis wrote:

Hi all,
how can i use SSLHttpCli in order to directly transfer the contents of a
remote text file ? Which are filesize limitations for that ?
For example, I have a file :
https://www.mydomain.com/myfile.txt and want to read it directly to client.
Thank you.
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be




--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Re: [twsocket] Receive log file text

2011-04-12 Thread Arno Garrels
daniel cc wrote:
 Hi,
 Can someone please help me out w ith a sample of how to,
 send a log (text file) from client to the server?
 My connection is with ICSSLServer and ICSSSLClient.

That works the same way as without SSL.
And it depends on your protocol. 
Typically you send a request to the server telling him
that you want to send a file. The request would include
filename and filesize in bytes. 
When the server received the request it opens an filestream,
turns off LineMode and sends back an OK-response or any error
code.
On receipt of the OK-response the client opens the file,
reads from it into a small buffer i.e. 4-16 KB and sends the
buffer content. The client sends subsequent data chunks 
from event OnDataSent until the file is completely sent.
The server simply receives into a small buffer and writes
buffer content to the filestream until filesize has been
reached. The server turns on LineMode back again and sends
a response to the client telling him whether everyting
went well or some error occurred.  

-- 
Arno Garrels


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Receive contents of remote text file over SSL

2011-04-12 Thread Arno Garrels
Dimitris Botsis wrote:
 Hi again,
 
 I use the example OverbyteIcsHttpDmo. When I call the text file on
 my web server using HTTP (as in the example) then I get the contents
 OK. When I use HTTPS (having added proper sslhttpcli and sslcontect
 components) the request is sent but don't get any contents back.
 Any ideas ?

Does the server support HTTPS?
If yes, try with the OverbyteIcsHttpsTst demo in SslInternet folder.
If that works search for differences in your code, otherwise the demo 
should log error messages.

-- 
Arno Garrels

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Receive contents of remote text file over SSL

2011-04-12 Thread Dimitris Botsis

On 12/4/2011 4:40 μμ, Arno Garrels wrote:

Dimitris Botsis wrote:

Hi again,

I use the example OverbyteIcsHttpDmo. When I call the text file on
my web server using HTTP (as in the example) then I get the contents
OK. When I use HTTPS (having added proper sslhttpcli and sslcontect
components) the request is sent but don't get any contents back.
Any ideas ?


Does the server support HTTPS?
If yes, try with the OverbyteIcsHttpsTst demo in SslInternet folder.
If that works search for differences in your code, otherwise the demo
should log error messages.


Of course the server supports HTTPS, if I use web browser it's all OK.
I tried OverbyteIcsHttpsTst demo but without luck.
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Re: [twsocket] Receive contents of remote text file over SSL

2011-04-12 Thread Dimitris Botsis

On 12/4/2011 5:04 μμ, Dimitris Botsis wrote:

On 12/4/2011 4:40 μμ, Arno Garrels wrote:

Dimitris Botsis wrote:

Hi again,

I use the example OverbyteIcsHttpDmo. When I call the text file on
my web server using HTTP (as in the example) then I get the contents
OK. When I use HTTPS (having added proper sslhttpcli and sslcontect
components) the request is sent but don't get any contents back.
Any ideas ?


Does the server support HTTPS?
If yes, try with the OverbyteIcsHttpsTst demo in SslInternet folder.
If that works search for differences in your code, otherwise the demo
should log error messages.


Of course the server supports HTTPS, if I use web browser it's all OK.
I tried OverbyteIcsHttpsTst demo but without luck.
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be




Sorry, it's OK - the example works fine.
I used some wrong predefined directives I had added and screw some 
things before...

Thank you very much

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Re: [twsocket] Receive log file text

2011-04-12 Thread daniel cc

Thanks Arno :)
I understand perfectly,
Do we have any samples about this?

About the file size,
the log file can be sometimes bigger than 3mb, does that makes problem?
it normally will be around 0-3mb



-Original Message- 
From: Arno Garrels 
Sent: Tuesday, April 12, 2011 4:40 PM 
To: ICS support mailing 
Subject: Re: [twsocket] Receive log file text 


daniel cc wrote:

Hi,
Can someone please help me out w ith a sample of how to,
send a log (text file) from client to the server?
My connection is with ICSSLServer and ICSSSLClient.


That works the same way as without SSL.
And it depends on your protocol. 
Typically you send a request to the server telling him

that you want to send a file. The request would include
filename and filesize in bytes. 
When the server received the request it opens an filestream,

turns off LineMode and sends back an OK-response or any error
code.
On receipt of the OK-response the client opens the file,
reads from it into a small buffer i.e. 4-16 KB and sends the
buffer content. The client sends subsequent data chunks 
from event OnDataSent until the file is completely sent.

The server simply receives into a small buffer and writes
buffer content to the filestream until filesize has been
reached. The server turns on LineMode back again and sends
a response to the client telling him whether everyting
went well or some error occurred.  


--
Arno Garrels

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Receive log file text

2011-04-12 Thread Arno Garrels
daniel cc wrote:
 Thanks Arno :)
 I understand perfectly,
 Do we have any samples about this?

I do not think so.

 
 About the file size,
 the log file can be sometimes bigger than 3mb, does that makes
 problem? it normally will be around 0-3mb

That's no problem, the filesize since D6/7 may be even greater
than 2 GB. It was limited to 2GB max in older Delphi versions 
since TStream did not use Int64.

-- 
Arno Garrels


 
 
 
 -Original Message-
 From: Arno Garrels
 Sent: Tuesday, April 12, 2011 4:40 PM
 To: ICS support mailing
 Subject: Re: [twsocket] Receive log file text
 
 daniel cc wrote:
 Hi,
 Can someone please help me out w ith a sample of how to,
 send a log (text file) from client to the server?
 My connection is with ICSSLServer and ICSSSLClient.
 
 That works the same way as without SSL.
 And it depends on your protocol.
 Typically you send a request to the server telling him
 that you want to send a file. The request would include
 filename and filesize in bytes.
 When the server received the request it opens an filestream,
 turns off LineMode and sends back an OK-response or any error
 code.
 On receipt of the OK-response the client opens the file,
 reads from it into a small buffer i.e. 4-16 KB and sends the
 buffer content. The client sends subsequent data chunks
 from event OnDataSent until the file is completely sent.
 The server simply receives into a small buffer and writes
 buffer content to the filestream until filesize has been
 reached. The server turns on LineMode back again and sends
 a response to the client telling him whether everyting
 went well or some error occurred.
 
 --
 Arno Garrels
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Receive contents of remote text file over SSL

2011-04-12 Thread Dimitris Botsis

On 12/4/2011 5:12 μμ, Dimitris Botsis wrote:

On 12/4/2011 5:04 μμ, Dimitris Botsis wrote:

On 12/4/2011 4:40 μμ, Arno Garrels wrote:

Dimitris Botsis wrote:

Hi again,

I use the example OverbyteIcsHttpDmo. When I call the text file on
my web server using HTTP (as in the example) then I get the contents
OK. When I use HTTPS (having added proper sslhttpcli and sslcontect
components) the request is sent but don't get any contents back.
Any ideas ?


Does the server support HTTPS?
If yes, try with the OverbyteIcsHttpsTst demo in SslInternet folder.
If that works search for differences in your code, otherwise the demo
should log error messages.


Of course the server supports HTTPS, if I use web browser it's all OK.
I tried OverbyteIcsHttpsTst demo but without luck.
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be




Sorry, it's OK - the example works fine.
I used some wrong predefined directives I had added and screw some
things before...
Thank you very much

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be





Sorry again but there is still a small problem :
The example mentioned stores the downloaded remote file locally and then 
(OnRequestDone) loads it again in order to display the contents of the 
file in the TMemo.

I see that the whole problem is because of streams.
How can I have the same result like in example but without saving 
transferred content to external file ?
I tried using MemoryStream or StringStream instead but whole think does 
not work.

Thank you.

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Re: [twsocket] Receive contents of remote text file over SSL

2011-04-12 Thread Dimitris Botsis

On 12/4/2011 7:18 μμ, Dimitris Botsis wrote:

On 12/4/2011 5:12 μμ, Dimitris Botsis wrote:

On 12/4/2011 5:04 μμ, Dimitris Botsis wrote:

On 12/4/2011 4:40 μμ, Arno Garrels wrote:

Dimitris Botsis wrote:

Hi again,

I use the example OverbyteIcsHttpDmo. When I call the text file on
my web server using HTTP (as in the example) then I get the contents
OK. When I use HTTPS (having added proper sslhttpcli and sslcontect
components) the request is sent but don't get any contents back.
Any ideas ?


Does the server support HTTPS?
If yes, try with the OverbyteIcsHttpsTst demo in SslInternet folder.
If that works search for differences in your code, otherwise the demo
should log error messages.


Of course the server supports HTTPS, if I use web browser it's all OK.
I tried OverbyteIcsHttpsTst demo but without luck.
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be




Sorry, it's OK - the example works fine.
I used some wrong predefined directives I had added and screw some
things before...
Thank you very much

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be





Sorry again but there is still a small problem :
The example mentioned stores the downloaded remote file locally and then
(OnRequestDone) loads it again in order to display the contents of the
file in the TMemo.
I see that the whole problem is because of streams.
How can I have the same result like in example but without saving
transferred content to external file ?
I tried using MemoryStream or StringStream instead but whole think does
not work.
Thank you.

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be




Hi again,
what I try now is get the non-SSL OverByteIcsHttpDemo, and instead Go 
button calling httpcli component, it calls an sslhttpcli component (I 
also added a proper sslcontext component) so code became :


procedure THttpToMemoForm.GoButtonClick(Sender: TObject);
var
Data : TMemoryStream;
begin
DisplayMemo.Clear;

GoButton.Enabled := FALSE;
Data := TMemoryStream.Create;
try
sslhttpcli1.URL:= URLEdit.Text;
//httpcli1.Proxy  := ProxyEdit.Text;
//httpcli1.ProxyPort  := '80';
sslhttpcli1.RcvdStream := Data;
sslhttpcli1.Get;
LoadMemoFromMemoryStream(DisplayMemo, Data);
finally
Data.Free;
GoButton.Enabled := TRUE;
end;
end;

As URLEdit1.Text, I set the whole URL up to the file, so it's like :
https://www.mydomain.com/myfile.txt

Can someone please explain or find why this does not work ?
It's exactly the same like non-SSL version.
Thank you.
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Re: [twsocket] Receive contents of remote text file over SSL

2011-04-12 Thread Arno Garrels
Dimitris Botsis wrote:
 Hi again,
 what I try now is get the non-SSL OverByteIcsHttpDemo, and instead
 Go button calling httpcli component, it calls an sslhttpcli
 component (I also added a proper sslcontext component) so code became
 : 
 
 procedure THttpToMemoForm.GoButtonClick(Sender: TObject);
 var
 Data : TMemoryStream;
 begin
 DisplayMemo.Clear;
 
 GoButton.Enabled := FALSE;
 Data := TMemoryStream.Create;
 try
 sslhttpcli1.URL:= URLEdit.Text;
 //httpcli1.Proxy  := ProxyEdit.Text;
 //httpcli1.ProxyPort  := '80';
 sslhttpcli1.RcvdStream := Data;
 sslhttpcli1.Get;
 LoadMemoFromMemoryStream(DisplayMemo, Data);
 finally
 Data.Free;
 GoButton.Enabled := TRUE;
 end;
 end;
 
 As URLEdit1.Text, I set the whole URL up to the file, so it's like :
 https://www.mydomain.com/myfile.txt
 
 Can someone please explain or find why this does not work ?

Show us your code in LoadMemoFromMemoryStream.
It makes no difference whether you use a TFile or TMemorystream.
Maybe you simply forgot to rewind the stream before the memo 
loads it?

-- 
Arno Garrels

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Receive contents of remote text file over SSL

2011-04-12 Thread Dimitris Botsis

On 12/4/2011 8:36 μμ, Arno Garrels wrote:

Dimitris Botsis wrote:

Hi again,
what I try now is get the non-SSL OverByteIcsHttpDemo, and instead
Go button calling httpcli component, it calls an sslhttpcli
component (I also added a proper sslcontext component) so code became
:

procedure THttpToMemoForm.GoButtonClick(Sender: TObject);
var
 Data : TMemoryStream;
begin
 DisplayMemo.Clear;

 GoButton.Enabled := FALSE;
 Data := TMemoryStream.Create;
 try
 sslhttpcli1.URL:= URLEdit.Text;
 //httpcli1.Proxy  := ProxyEdit.Text;
 //httpcli1.ProxyPort  := '80';
 sslhttpcli1.RcvdStream := Data;
 sslhttpcli1.Get;
 LoadMemoFromMemoryStream(DisplayMemo, Data);
 finally
 Data.Free;
 GoButton.Enabled := TRUE;
 end;
end;

As URLEdit1.Text, I set the whole URL up to the file, so it's like :
https://www.mydomain.com/myfile.txt

Can someone please explain or find why this does not work ?


Show us your code in LoadMemoFromMemoryStream.
It makes no difference whether you use a TFile or TMemorystream.
Maybe you simply forgot to rewind the stream before the memo
loads it?

No, LoadMemoryFromMemoryStream is completely untouched and stream is 
being rewind. Code is exactly the same.
Now I set to sslhttcli component that I added, SocksLevel to 5 (was 0) 
and seems to get better but generally it seems rather unstable.
Additionally I have another problem since I want to load all the 
contents to a RichEdit but very often I get Richedit Line insertion 
error but while I used Thttpget (but without SSL support) for some 
months it worked without any problem.
I suppose I must search more to find solution using ICS - any 
help/instructions is appreciated.

Thank you.
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

[twsocket] TWsocket connection error 10048

2011-04-12 Thread RayA @ Ihug
Hi... 

I have got to the bottom of the Error 10048

It seems that the order in witch you assign values to the TWSocket
properties when you want to open a client is important
   - so now I can open and close the client heaps of times with out the
error 10048 being raised :-)

The code I was using looked like this

TheTCPClientSocket-Proto = tcp;
TheTCPClientSocket-Port= TCP_ClientPort;
TheTCPClientSocket-Addr= TCP_ClientAddress;
TheTCPClientSocket-LocalPort = TCP_ClientPort;
TheTCPClientSocket-LocalAddr = 0.0.0.0;
TheTCPClientSocket-Connect();


The correct code that works looks like this

TheTCPClientSocket-Addr= TCP_ClientAddress;
TheTCPClientSocket-Proto = tcp;
TheTCPClientSocket-Port= TCP_ClientPort;
TheTCPClientSocket-Connect();


Does anyone know why this is the case ???


Hope this helps anyone else who is having this problem

Regards
Ray

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be