Re: [twsocket] HTTPS problem

2013-02-09 Thread Wilfried Mestdagh
Hi Arno,

I did copy Openssl v0.9.8x from the wiki. First I got 'unsupported ssl
version', but this VM still uses ICS version 5.x. So I download ICS version
7.x and copied the vc32 directory to a new search path, changed the
filenames to 'OverbyteIcsxxx' and all is working now ;-)

I also got information from Belgacom. The day it stopped working they
upgraded there reverse proxy to a newer version, so there was maybe some
conflict between SSL versions.

This is a test application, now I will do same changes in the production
application. I hope there will no conflicts because it is very large and
contains a lot of server and clients using ICS version 5.x. However there is
only 1 unit (this one) using SSL so I assume there will be no problem.

Thanks again for the help!

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.be


 -Oorspronkelijk bericht-
 Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
 Namens Arno Garrels
 Verzonden: vrijdag 8 februari 2013 17:53
 Aan: ICS support mailing
 Onderwerp: Re: [twsocket] HTTPS problem
 
 Wilfried Mestdagh wrote:
  It is an old application written in Delphi 7.
 
 No problem since both ICSv7 and ICSv8 still support Delphi 7.
 
 --
 Arno
 --
 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] HTTPS problem

2013-02-08 Thread Wilfried Mestdagh
Hello Arno,

Ok I will try with latest version. This is at the moment not the case. It is
an old application written in Delphi 7. Normally I don't update components
at the time there are a lot of commercial applications because I cannot test
them all.

But I have Delphi XE on another VM and will try with latest version first.

I have news hewever from Belgacom. But they know nothing about SSL. The only
thing they see is that my request gets to there reverse proxy witch
generates a 403 error. But I don't get a 403. According to them there should
be something wrong with my SSL but they don't know what.

I will first try again with latest version and then I come back here.

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.be


 -Oorspronkelijk bericht-
 Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
 Namens Arno Garrels
 Verzonden: woensdag 6 februari 2013 18:47
 Aan: ICS support mailing
 Onderwerp: Re: [twsocket] HTTPS problem
 
 Arno Garrels wrote:
  If you send that file to me as PM
  I'll take a look at it when
  I have some minutes,
 
 Hello Wilfried,
 
 Received your log thanks, it looks strange!
 
 When I try to Post some nonsense data to your URL it
 works as expected (404 return). Strange is that the server seems
 to initiate a SSL/TLS renegotiation so there are two
 OnSslHandshakeDone events for me.
 
 The first handshake in _your log succeeds however the second fails:
 {code}
 - 15:13:48:793 ICB SSL3 alert read fatal handshake failure
 - 15:13:48:803 00A94398 BIO_read(sslbio, 0x1, 0) = 0   [186]
 - 15:13:48:803 00A94398  1812  [187] error:14094410:SSL
 routines:SSL3_READ_BYTES:sslv3 alert handshake failure
 {code}
 
 Maybe a newer OpenSSL libraries will help since some older versions
 did not support renegotiation due to some security issue that was
 fixed in newer versions. In my test above I used Openssl v0.9.8x
 32-bits from: http://wiki.overbyte.be/wiki/index.php/ICS_Download
 with latest ICSv8, latest ICSv7 should make no difference in this
 regard.
 
 --
 Arno
 --
 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] HTTPS problem

2013-02-08 Thread Wilfried Mestdagh
Ik ga dus eerst proberen in Delphi XE met latest version.

 -Oorspronkelijk bericht-
 Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
 Namens Arno Garrels
 Verzonden: woensdag 6 februari 2013 18:47
 Aan: ICS support mailing
 Onderwerp: Re: [twsocket] HTTPS problem
 
 Arno Garrels wrote:
  If you send that file to me as PM
  I'll take a look at it when
  I have some minutes,
 
 Hello Wilfried,
 
 Received your log thanks, it looks strange!
 
 When I try to Post some nonsense data to your URL it
 works as expected (404 return). Strange is that the server seems
 to initiate a SSL/TLS renegotiation so there are two
 OnSslHandshakeDone events for me.
 
 The first handshake in _your log succeeds however the second fails:
 {code}
 - 15:13:48:793 ICB SSL3 alert read fatal handshake failure
 - 15:13:48:803 00A94398 BIO_read(sslbio, 0x1, 0) = 0   [186]
 - 15:13:48:803 00A94398  1812  [187] error:14094410:SSL
 routines:SSL3_READ_BYTES:sslv3 alert handshake failure
 {code}
 
 Maybe a newer OpenSSL libraries will help since some older versions
 did not support renegotiation due to some security issue that was
 fixed in newer versions. In my test above I used Openssl v0.9.8x
 32-bits from: http://wiki.overbyte.be/wiki/index.php/ICS_Download
 with latest ICSv8, latest ICSv7 should make no difference in this
 regard.
 
 --
 Arno
 --
 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] HTTPS problem

2013-02-05 Thread Wilfried Mestdagh
Hello,

I have a application with THttpCli posting data to a server in HTTPS.
Normally I have to get back a little data and a statuscode 201. Certainly it
won't work anymore. Here is nothing changed (only the internet provider and
a faster VDSL line) and provider say it is still working when they test
locally.

I set IcsLogger, but I'm not sure what I should conclude from this log. I'm
not HTTPS experience :( Can someone say what possible go wrong seeing this
log?

// This is log from my application, Url and data
5/02/2013 11:44:31 URL:
https://api.beopen.belgacom.be/SendSmsService/OneAPI_RES
T_v2_0/ui_smpp0/2_0/smsmessaging/outbound/32473803180/requests

Data:
{outboundSMSMessageRequest:{address:[tel:+32477639544],outboundSMST
extMessage:{message:This is a
testmessage},senderAddress:32473803180,r
eceiptRequest:{notifyURL:http:\/\/10.124.13.140:10101\/MockRestService\/
rest
},clientCorrelator:1}}

// This is log from IcsLogger
- State = httpNotConnected
- Login api.beopen.belgacom.be
- State = httpDnsLookup
- State = httpDnsLookupDone
- connect to 195.13.15.43/443
- SessionConnected
- State = httpConnected

5/02/2013 11:44:31 Session connected

- State = httpWaitingHeader
- 6 header lines to send
POST
/SendSmsService/OneAPI_REST_v2_0/ui_smpp0/2_0/smsmessaging/outbound/3247380
3180/requests HTTP/1.0
Accept: application/json
Content-Type: application/json;charset=UTF-8
User-Agent: Mozilla/4.0 (compatible; ICS)
Host: api.beopen.belgacom.be:443
Content-Length: 261

- SendRequest Done
- SessionClosed Error: 0

5/02/2013 11:44:31 Session closed

- State = httpReady
- PrepareNTLMAuth end, FStatusCode = 0 FProxyAuthNTLMState=0
FAuthNTLMState=0
- PrepareNTLMAuth end, FStatusCode = 0 FProxyAuthNTLMState=0
FAuthNTLMState=0
- RequestDone

// Again log from my application
5/02/2013 11:44:31 RequestDone, Error: 0, Statuscode: 0


-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.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] how to make browser upload a file

2011-10-31 Thread Wilfried Mestdagh
Hi,

I try to upload a file in THttpSrv, but in ExtractURLEncodedvalue, I only
have 'datafile' containing the filename. If I try with socketspy in between
the I do not see any upload of the file (only datafile=filename.ext). So I
think I'm missing something.

This is the generated HTML code to upload the file. How to instruct the
browser to really upload the file and not only his name?

form method=post action=/sam/importExportAdmins.html
table
tr
tdinput type=file name=datafile size=40
tdinput type=submit value=Upload

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.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] SSL session closed with 10053

2011-10-18 Thread Wilfried Mestdagh
   HttpCli := THttpCli.Create(nil);

Of course it had to be: TSslHttpCli.Create(nil);

It is working now, thanks!

mvg, Wilfried

 -Oorspronkelijk bericht-
 Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
 Namens Fastream Technologies
 Verzonden: maandag 17 oktober 2011 15:56
 Aan: ICS support mailing
 Onderwerp: Re: [twsocket] SSL session closed with 10053
 
 Use HttpCli.SslContext := TSslContext.Create(nil);
 Best Regards,
 
 SubZero
 On Mon, Oct 17, 2011 at 16:06, Wilfried Mestdagh
 wilfr...@mestdagh.bizwrote:
 
  Ok thx SZ :)
 
FSslContext := TSslContext.Create(nil);
HttpCli := THttpCli.Create(nil);

--
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] SSL session closed with 10053

2011-10-17 Thread Wilfried Mestdagh
Hi,

This is my First SSL with THttpCli. This site requires a BASIC
authentication but that is not importand here. The strange thing is I get a
session closed with winsock error 10053.

Nothing is sent. If I put SocketSpy in between then I also have the 10053
in Socketspy immediately after the client connect. So I think there is
something I forget. I have add the 2 DLL's into project folder, USE_SLL in
project options. Do I have something else to do?

Note that this is a project in Delphi7 with ThttpCli version 1.93. ICSSSLLAY
and ICSLIBEAY are both from 2006. So version period is same I think.

I have IcsLogger log here. It seems the 10053 is with the StartSslHandshake.
But I have no idea what could be wrong:

- State = httpNotConnected
- Login belgacom-demo.aepona.com
- State = httpDnsLookup
- State = httpDnsLookupDone
- connect to 79.98.233.145/443
- TWSocket will connect to 79.98.233.145:443
- AsyncSelect CtrlSocket1812, 16 FD_CONNECT
- SessionConnected
- State = httpConnected
- State = httpWaitingHeader
- 6 header lines to send
POST
/SendSmsService/OneAPI_REST_v1_0/sandbox/1/smsmessaging/outbound/3247380318
0/requests HTTP/1.0
Accept: application/json
Content-Type: application/xml
User-Agent: Mozilla/4.0 (compatible; ICS)
Host: belgacom-demo.aepona.com:443
Content-Length: 134
- 00A91FDC PutDataInSslBuffer 1812 len 260  [1]
- 00A91FDC SslTryToSend 1812
- SendRequest Done
- 00A91FDC PutDataInSslBuffer 1812 len 134  [2]
- 00A91FDC SslTryToSend 1812
- 00A91FDC StartSslHandshake 1812
- SessionClosed Error: 10053
- AsyncSelect CtrlSocket1812, 2 FD_WRITE
- State = httpReady
- PrepareNTLMAuth end, FStatusCode = 0 FProxyAuthNTLMState=0
FAuthNTLMState=0
- PrepareNTLMAuth end, FStatusCode = 0 FProxyAuthNTLMState=0
FAuthNTLMState=0
- RequestDone

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.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] SSL session closed with 10053

2011-10-17 Thread Wilfried Mestdagh
Hi Arno,

Thank you. You put me on a tracé. I put a breakpunt over there, it is not
the FSslEnable, but FSslContext is NIL so exeption is raised and eaten
somewhere.

Now my question: What is SSLContext and what should I do with it?

procedure TCustomSslWSocket.StartSslHandshake;
begin
{$IFNDEF NO_DEBUG_LOG}
if CheckLogOptions(loSslInfo) then  { V5.21 }
DebugLog(loSslInfo, IntToHex(Integer(Self), 8) +
  ' StartSslHandshake ' + IntToStr(FHSocket));
{$ENDIF}
if not FSslEnable then
Exit;
if not Assigned(FSslContext) then
raise Exception.Create('SSL requires a context object'); -- Here
Exception

-- 
mvg, Wilfried

--
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] SSL session closed with 10053

2011-10-17 Thread Wilfried Mestdagh
Hello SZ,

Stupid question: in which unit is TSSlContext declared? I'm pulling my hair :(

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.be


 -Oorspronkelijk bericht-
 Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
 Namens Fastream Technologies
 Verzonden: maandag 17 oktober 2011 13:56
 Aan: ICS support mailing
 Onderwerp: Re: [twsocket] SSL session closed with 10053
 
 Hello Wilfried,
 
 You create one TSslContext per SSL certificate your server has and you
 need
 to assign one of it to each ICS SSL instance. It is useful in sharing
 SSL
 context objects accross many SSL client/servers in a thread.
 Best Regards,
 
 SZ

--
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] SSL session closed with 10053

2011-10-17 Thread Wilfried Mestdagh
Ok thx SZ :)

   FSslContext := TSslContext.Create(nil);
   HttpCli := THttpCli.Create(nil);

Where and to what do I assign FSslContext to THttpCli ?

-- 
mvg, Wilfried

--
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] PCSensor server/ Simple client-server

2011-09-23 Thread Wilfried Mestdagh
Hi,

 to the target server, I need to send just two bytes, 0xBB and
 0x83

You only need the HttpCli if you use HTTP protocol. Your device does not. It
uses his own protocol (receiving 2 bytes - sending results). So you need to
develop a simple TCP client program using TWSocket.

If you need to send the first item after the device gives you some welcome
data then you have to examine that in OnDataAvailable and send from there.
If it does not you send the 2 bytes in the OnSessionConnected event.

Just fire some more questions if you need it :)

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.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] PCSensor server/ Simple client-server

2011-09-23 Thread Wilfried Mestdagh
Hi,

 Would the demo Client5: A basic client program using TWSocket
 component. seem to you who know like an alternative good starting
 point for my efforts?

The good starting point is: do not copy! - Study example; then start from
nothing - zero - null !

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.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] Hdr From and To cutting off

2011-09-21 Thread Wilfried Mestdagh
Hi,

 I would like to instead use the first option and not have it cut off on
 the first word.  Is that possible?

The result is depending on the email reader of the recipient and not
predicable if you don't follow the rules. See the RFC's for header lines in
emails therefore. You must build a header like this: the name the@mail.
If you do so then it will be in each email reader what you expect.

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.be

 -Oorspronkelijk bericht-
 Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
 Namens Neal Barnett
 Verzonden: woensdag 21 september 2011 19:33
 Aan: twsocket@elists.org
 Onderwerp: [twsocket] Hdr From and To cutting off
 
 Hi -
 
 I am setting HdrFrom and HdrTo parameters during an Email Send, like
 this:
 
 SslSmtpCli1.HdrFrom:='This Is From Me';
 SslSmtpCli1.HdrTo:='All Of My Recipients';
 
 However, when receiving the email, I only see the first word of each
 parameter, so it would look like this:
 From: This
 To: All
 
 I can get around this (sort of) by doing something like this (note the
 double quotes inside the single quotes):
 
 SslSmtpCli1.HdrFrom:='This Is From Me myem...@mydomain.com';
 SslSmtpCli1.HdrTo:='All Of My Recipients yourem...@yourdomain.com';
 
 Then, I get
 From: This Is From Me myem...@mydomain.com
 To: All Of My Recipients yourem...@yourdomain.com
 
 I would like to instead use the first option and not have it cut off on
 the
 first word.  Is that possible?
 
 Thanks,
 --
 Neal
 
 
 --
 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] HTTP 401 missing header line

2011-09-18 Thread Wilfried Mestdagh
Hello,

I'm trying to POST to a server that needs authentication. I expect a 401
from the server with in the header something like:
WWW-Authenticate: Basic Realm=/something

But it is not in the response. Also what does the 'connection: close' mean?
I think the THttpCli does not send an authentication because of the missing
line. Can someone explain this to me?

TX:

POST /sms/smsmessaging/outbound/tel%3A%2B32473042292/requests HTTP/1.0
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/4.0 (compatible; ICS)
Host: localhost
Content-Length: 0

RX:

HTTP/1.0 401 Unauthorized
Connection: close
Content-Length: 243
Content-Type: text/xml; charset=UTF-8

EE06
Exception
Status401/Status
MessageAuthentication: Not Authenticated/Message
Code1020/Code
 
Request/sms/smsmessaging/outbound/tel:+32473042292/requests/Request
/Exception
/EE06

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.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] HTTP 401 missing header line

2011-09-18 Thread Wilfried Mestdagh
Hi Angus,

Yes indeed, I found out already. The authentication is an argument in the
POST command. When it is invalid or missing the server returns a 401 with
the missing header line. Is that a bug in the server?
 
-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.be


 -Oorspronkelijk bericht-
 Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
 Namens Angus Robertson - Magenta Systems Ltd
 Verzonden: zondag 18 september 2011 15:10
 Aan: twsocket@elists.org
 Onderwerp: Re: [twsocket] HTTP 401 missing header line
 
  I'm trying to POST to a server that needs authentication. I expect
  a 401 from the server with in the header something like:
  WWW-Authenticate: Basic Realm=/something
 
 This is a pure guess, but maybe the WWW-Authenticate header is only
 returned for GET requests, with POST you are supposed to know that
 authentication is needed and send the Authorization: command with the
 request?
 
  Request/sms/smsmessaging/outbound/tel:+32473042292/requests/Reque
 
 I'm just writing a Delphi component to send SMS messages via HTTP and a
 GSM modem, with a queue in case there are delivery problems.
 
 The two UK providers I'm initially supporting (Kapow and TextMagic)
 both
 pass authentication as arguments in the GET or POST strings, rather
 than
 using the Authorization: command.  If you have a test account and
 documentation for your provider, adding a third provider will be easy.
 
 Angus
 
 
 --
 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] DLL implementation advice (or example)...

2011-09-15 Thread Wilfried Mestdagh
Hi Adam,

 despite tearing out some hair and losing a

Hopefully you have spare :)

 Result := PAnsiChar(NotesList.Strings[0]);
 NotesList.Delete(0);

The problem is that you give a pointer to the return value of that function
to something that not exists anymore after the functions exit:

 Result := PAnsiChar(NotesList.Strings[0]);

You give a pointer to a string

 NotesList.Delete(0);

And here you destroy the string you point to

 critical section code or not... I thought I might as the worker thread

You only need Critical section if you access same data from out different
thread context. So if this is not the case then you don't need it.

Was this clear to answer your questions?

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.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] DLL implementation advice (or example)...

2011-09-11 Thread Wilfried Mestdagh
Hi Adam,

You have to make a custom message handler and post a message to it. Then
this handler will execute outside the event. Something like this:

const
WM_RECONNECT = WM_USER + 1;
private
procedure WMReconnect(var Msg: TMessage); message WM_RECONNECT;

procedure TSomething.SocketSessionClosed;
begin
PostMessage(Handle, WM_RECONNECT, 0 , 0);

If your TSomething does not have a Handle then you have to create one with
AllocateHWND procedure (and free it later) and you have to make a WinProc
procedure.

If it is threaded code then you also have to make a message pump. Please ask
if something is not clear.

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.be


 -Oorspronkelijk bericht-
 Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
 Namens Adam Burgoyne
 Verzonden: zondag 11 september 2011 16:42
 Aan: 'ICS support mailing'
 Onderwerp: Re: [twsocket] DLL implementation advice (or example)...
 
 Hi, Wilfried
 
 I'm pleased to say that I've made good progress with the system so far
 but
 I'm not sure how to best implement server alternation.
 
 Very simply, the current system works with a main server and a fail-
 over
 server.
 
 All initial connections are made to the main server (I have this part
 working fine) but, if the main server is unavailable then clients will
 attempt to connect to the fail-over server.
 
 What I need the client to do is try connecting to the other server if
 the
 current connection cannot be made within a few seconds or if the
 current
 connection gets dropped for any reason.
 
 I've started playing around with it but I'm not sure I'm doing things
 correctly.
 
 I saw a post (from you I think) in the ICS help that mentioned sending
 a
 message from the sessionclosed procedure but it didn't specify what
 message to send.
 
 Is there a list of messages that can be used with ICS?
 
 Regards, Adam
 
 
 -Original Message-
 From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
 On
 Behalf Of Wilfried Mestdagh
 Sent: 09 September 2011 09:04
 To: 'ICS support mailing'
 Subject: Re: [twsocket] DLL implementation advice (or example)...
 
 Hi Adam,
 
  The problem is that the DLL is quite unstable so I was trying to use
 a
  different approach and hoping to get better stability.
 
 Are we talking about TWSocket in your second approach?
 
  Right now, I have the basic DLL test project running - it is
  connecting to my server but the worker thread is not terminating so
  either the server is not sending a response or the ondatareceived
  event is not triggering.
 
 I'm not sure if a TDatamodule is thread safe. Anyway I never used it.
 Note
 that what you create in a constructor is in main thread context. You
 have to
 create (and destroy) the components in the Execute method of that
 thread. If
 you do not then you have a false thread.
 
 --
 mvg, Wilfried
 
 --
 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

--
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] DLL implementation advice (or example)...

2011-09-09 Thread Wilfried Mestdagh
Hi Adam,

 The problem is that the DLL is quite unstable so I was trying to use a
 different approach and hoping to get better stability.

Are we talking about TWSocket in your second approach?

 Right now, I have the basic DLL test project running - it is connecting
 to
 my server but the worker thread is not terminating so either the server
 is
 not sending a response or the ondatareceived event is not triggering.

I'm not sure if a TDatamodule is thread safe. Anyway I never used it. Note
that what you create in a constructor is in main thread context. You have to
create (and destroy) the components in the Execute method of that thread. If
you do not then you have a false thread.

-- 
mvg, Wilfried

--
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] DLL implementation advice (or example)...

2011-09-08 Thread Wilfried Mestdagh
Hi Adam,

 Hi - after pulling out a lot of hair

Hopefully you have some reserve :)

 I've spent the last couple of days tinkering with the DLL 1 example but

DLL is not different from other. Only think is if you write a DLL you maybe
don't know who call it. Maybe a programmer will use the DLL wich has no
knowledge of message pump or the way windows work. Maybe you have to write
your own message pump in that case.

 Connect() needs to be passed the host, the port, the username, the

If you have a working message pump then after a connection then
OnSessionconnected will fire. Then you have it all.

 What I need Connect() to do is kick off a worker thread that continues
 running and manages the socket connection without blocking the calling
 process as the current DLL example does.

I'm not sure wy do you need a separate worker thread?

 2)  SendStr() the username

SendStr is what you can do in the OnSessionConnected event

 .then sit in a loop where it:

You don't need a loop! TWSocket is event driven (fortinatly)

 3)  Monitors for incoming messages and adds each message to a
 TStringList

Every receved data you can add. Note that TCP is NOT package bound garantie.

 4)  Fires off a PostMessage() to the specified window of the main
 application every pump rate milliseconds

You can give the handle to the window to the DLL from the calling
application.

 Connected() simply returns the connection status of the socket
 GetMessage() returns information from the TStringList
 Disconnect() signals the worker thread to gracefully drop the
 connection (if
 possible) and close down

Just call the right TWSocket methods

 One of the difficulties seems to be that the socket would be running
 within
 the worker thread but the functions and data that I need to access
 would be
 in the global scope.

If you are certain you need a separate thread then you can use PostMessage
(or SendMessage)

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.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] Is it possible to lose an accept select message?

2011-09-05 Thread Wilfried Mestdagh
Hi,

Possible you have an unhandled exception. Please put some logging code into
the event OnBGException to check this, as well for the server socket as for
the data (client) sockets.

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.be


 -Oorspronkelijk bericht-
 Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
 Namens Henk van der Meer
 Verzonden: maandag 5 september 2011 12:29
 Aan: twsocket@elists.org
 Onderwerp: [twsocket] Is it possible to lose an accept select message?
 
 We use ICS for a TCP server. Is typically serves a few hundreds of
 clients (200-500).
 They typically connect so that the server receives connection request
 on a regular pace.
 The connection rate usually starts with some 10s per second to 1 or 2
 per second.
 We have noticed a problem that after some time (sometimes just a few
 minutes) the server stops receiving new connections. After working on
 this problem for a long time we have found a 'work around'.
 When we notice that we have not received a new connection for some time
 we can click a button that executes some code that we hacked into ICS.
 What it actually does is call
 TCustomWSocketServer.TriggerSessionAvailable(0);
 This will make the server accepting new connections for some time until
 it stops receiving new connections again. We can do this endlessly.
 When we press this button when the server is still accepting new
 connection we get a would block exception.
 We have concluded that there is still a accept select message to
 process when this problem occurs.
 Does somebody have the same kinds of problems?
 Does somebody have a solution?
 Thank you,
 Henk van der Meer
 Time Service
 Ps we have found some issues that may be related but did not provide a
 solution:
 http://marc.info/?l=twsocketm=130324417129390w=2
 http://marc.info/?l=twsocketm=110086858419142w=2
 
 --
 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] Is it possible to lose an accept select message?

2011-09-05 Thread Wilfried Mestdagh
Hi Henk,

No, if you have an unhandled exception in one of the events then the
OnBGException is fired. This is because most (if not all) of the events are
called from the middle of nowhere (the windows message pump).

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.be


 -Oorspronkelijk bericht-
 Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
 Namens Henk van der Meer
 Verzonden: maandag 5 september 2011 16:25
 Aan: ICS support mailing
 Onderwerp: Re: [twsocket] Is it possible to lose an accept select
 message?
 
 Hello Wilfried,
 
 Thanks for answering.
 Wouldn't an unhandled exception show up in a message box?
 
 Henk van der Meer
 Time Service
 
 
 -Oorspronkelijk bericht-
 Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
 Namens Wilfried Mestdagh
 Verzonden: maandag 5 september 2011 16:04
 Aan: 'ICS support mailing'
 Onderwerp: Re: [twsocket] Is it possible to lose an accept select
 message?
 
 Hi,
 
 Possible you have an unhandled exception. Please put some logging code
 into the event OnBGException to check this, as well for the server
 socket as for the data (client) sockets.
 
 --
 mvg, Wilfried
 http://www.mestdagh.biz
 http://www.comfortsoftware.be
 http://www.expertsoftware.be
 
 
  -Oorspronkelijk bericht-
  Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
  Namens Henk van der Meer
  Verzonden: maandag 5 september 2011 12:29
  Aan: twsocket@elists.org
  Onderwerp: [twsocket] Is it possible to lose an accept select
 message?
 
  We use ICS for a TCP server. Is typically serves a few hundreds of
  clients (200-500).
  They typically connect so that the server receives connection request
  on a regular pace.
  The connection rate usually starts with some 10s per second to 1 or 2
  per second.
  We have noticed a problem that after some time (sometimes just a few
  minutes) the server stops receiving new connections. After working on
  this problem for a long time we have found a 'work around'.
  When we notice that we have not received a new connection for some
 time
  we can click a button that executes some code that we hacked into
 ICS.
  What it actually does is call
  TCustomWSocketServer.TriggerSessionAvailable(0);
  This will make the server accepting new connections for some time
 until
  it stops receiving new connections again. We can do this endlessly.
  When we press this button when the server is still accepting new
  connection we get a would block exception.
  We have concluded that there is still a accept select message to
  process when this problem occurs.
  Does somebody have the same kinds of problems?
  Does somebody have a solution?
  Thank you,
  Henk van der Meer
  Time Service
  Ps we have found some issues that may be related but did not provide
 a
  solution:
  http://marc.info/?l=twsocketm=130324417129390w=2
  http://marc.info/?l=twsocketm=110086858419142w=2
 
  --
  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
 --
 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] multithread server

2011-08-18 Thread Wilfried Mestdagh
Hi,

When receive returns -1 then it indicate an error, but you don't have to
worry about it. If MultiThread is True then TWSocket uses his own message
pump. You can use it yourself also or override it.

If OnDataAvailable is called in a closed loop then there is something wrong
with winsock.

You tell that it happens after a while when many clients connecting (and
disconnecting ???). Is this predictable?

Is it possible you have many sockets in TIME_WAIT state or that you have run
out of non-pagable memory? You can check the former with 'netstat -a'. The
latter with task manager. Note that a socket uses 10kb (or more depeniding
on traffic), that non-pagable memory is maximum 1/8 of total real memory
(not virtual).

Have you the same problem if you run the same application in a GUI or
console application?

You can set wsoNoReceivedLoop for each client then OnDataAvailable is not
called in closed loop but with a message handler. Eventually more easy to
debug?

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.be

 -Oorspronkelijk bericht-
 Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
 Namens Lukáš Skála
 Verzonden: donderdag 18 augustus 2011 8:05
 Aan: twsocket@elists.org
 Onderwerp: Re: [twsocket] multithread server
 
 hi,
 I always call Receive (even if RcvdCount returns zero). When RcvdCount
 returns zero then Receive returns -1 value. Is it normal?
 What is property Multithreaded in TWServerSocket? Should it be set to
 TRUE? In demo application property is set to FALSE and only client
 sockets are set to TRUE.
 
 Now I have no idea where is problem with service hanging. Any idea
 where
 to look is welcome.
 Thanks
 Lukas Skala
 
 
 Dne 17.8.2011 18:18, Wilfried Mestdagh napsal(a):
  Hi,
 
  If OnDataAvailable triggers then you have to try to receive data,
 even if RcvdCount (wich is unreliable) returns 0. If you don't receive
 then OnDataAvailable will be called again in a closed loop en that is
 probably what happens.
 
 
 
 --
 lukas skala
 envinet a.s.
 divize projektu a inzenyringu (project and engineering division)
 modrinova 1094
 674 01 trebic
 
 tel: +420 568 409 862 (811)
 fax: +420 568 409 875
 gsm: +420 724 461 062
 icq: 66842878
 eml: lukas.sk...@envinet.cz, luky.sk...@gmail.com
 www: http://envinet.cz
 
 
 
 
 --
 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] multithread server

2011-08-17 Thread Wilfried Mestdagh
Hi,

If OnDataAvailable triggers then you have to try to receive data, even if 
RcvdCount (wich is unreliable) returns 0. If you don't receive then 
OnDataAvailable will be called again in a closed loop en that is probably what 
happens.

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.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] Socket flushing

2011-08-02 Thread Wilfried Mestdagh
Hi Eric,

You cannot be 100% all data is sent if you destroy or close a socket
immediately after send. You should put code in OnDataSend and set a flag or
so. At this point you know TWSocket has all data delivered to winsock but
perhaps not yet sent. OnSendData is called after it, there you know winsock
buffer is empty and will not fill again because buffer in TWSocket is empty.
There you can call Shutdown or CloseDelayed. Then OnSessionClosed is fired.
At this point you can call Release method to destroy TWSocket and / or your
class.

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.be


 -Oorspronkelijk bericht-
 Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
 Namens Éric Fleming Bonilha
 Verzonden: maandag 1 augustus 2011 21:39
 Aan: 'ICS support mailing'
 Onderwerp: Re: [twsocket] Socket flushing
 
  Then use Shutdown(2);
  Easy to do a testcase for Eric I think. His proposition to use
 Close() is
  not good, CloseDelayed should give a little better but not on a LAN.
 
 I see
 
 The problem is that I can´t wait, because actually this is can be even
 done
 on classes destructors such as:
 
 procedure TMyClass.SendTeardown;
 begin
 
   FSocket.Send(@Data[0], Length(Data));
 
 end;
 
 destructor TMyClass.destroy;
 begin
 
   // Send RTSP Teardown message
   SendTeardown;
 
   // Release the socket
   FSocket.Free;
 
   inherited Destroy;
 
 end;
 
 So, I can´t wait for events or anything because the socket will be
 destroyed
 
 In my testing, if I send the data and destroy the socket, the data is
 actually sent (I can see it on sniffer), even on remote internet hosts
 
 Eric
 
 
  -Oorspronkelijk bericht-
  Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
  Namens Arno Garrels
  Verzonden: maandag 1 augustus 2011 16:57
  Aan: ICS support mailing
  Onderwerp: Re: [twsocket] Socket flushing
 
  Wilfried Mestdagh wrote:
   Hi Eric,
  
   Socket.Send(@Data[0], Length(Data));
   Socket.Close;
  
   I think this is better:
  
   Socket.Send(@Data[0], Length(Data));
   Socket.Shutdown(1);
 
  This can be dangerous, Shutdown(1) disables sends on the socket,
  if not all has been sent yet you'll get a socket exception
  on the next internal send attempt. Best practise is to set a
  flag and call it from OnDataSent if that flag is set.
  Well, you could check WSocket.AllSent however what would
  you do if it returnd False?
 
  --
  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
 
 --
 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] Socket flushing

2011-08-01 Thread Wilfried Mestdagh
Hi Arno,

 Why? Do you have arguments?

No, just something I recall, but it is very long time ago so I assume you
are right.

 I agree that Flush generally violates the async paradigm and
 _might cause problems, however removing the call to MessagePump
 should not make a difference.

OK

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.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] Socket flushing

2011-08-01 Thread Wilfried Mestdagh
Hi Eric,

 Socket.Send(@Data[0], Length(Data));
 Socket.Close;

I think this is better:

 Socket.Send(@Data[0], Length(Data));
 Socket.Shutdown(1);

This will send all data, telling the other end to signal to close when
received. There is in your case no need to call the Flush method.

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.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] Socket flushing

2011-08-01 Thread Wilfried Mestdagh
Then use Shutdown(2);
Easy to do a testcase for Eric I think. His proposition to use Close() is
not good, CloseDelayed should give a little better but not on a LAN.

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.be


 -Oorspronkelijk bericht-
 Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
 Namens Arno Garrels
 Verzonden: maandag 1 augustus 2011 16:57
 Aan: ICS support mailing
 Onderwerp: Re: [twsocket] Socket flushing
 
 Wilfried Mestdagh wrote:
  Hi Eric,
 
  Socket.Send(@Data[0], Length(Data));
  Socket.Close;
 
  I think this is better:
 
  Socket.Send(@Data[0], Length(Data));
  Socket.Shutdown(1);
 
 This can be dangerous, Shutdown(1) disables sends on the socket,
 if not all has been sent yet you'll get a socket exception
 on the next internal send attempt. Best practise is to set a
 flag and call it from OnDataSent if that flag is set.
 Well, you could check WSocket.AllSent however what would
 you do if it returnd False?
 
 --
 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


Re: [twsocket] Socket flushing

2011-07-30 Thread Wilfried Mestdagh
H Eric,

 If I keep a loop like this
 
 while (FHSocket  INVALID_SOCKET) and (not bAllSent) do
   TryToSend;
 
 And TryToSend fails, will it fail everytime if I don´t call the message
 pump? In this case an infinite loop would happen right?

I think so yes.

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.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] Socket flushing

2011-07-30 Thread Wilfried Mestdagh
Hi Eric,

If the reason that you call the Flush method is because you want to be sure
all is sent before closing the socket then you can better call ShutDown(1)
method.

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.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] Socket flushing

2011-07-27 Thread Wilfried Mestdagh
Hi Eric,

TryToSend will exit if winsock returns WSAEWOULDBLOCK. I think that is the
reason for the message pump call. I never used the Flush method.

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.be


 -Oorspronkelijk bericht-
 Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
 Namens Éric Fleming Bonilha
 Verzonden: maandag 25 juli 2011 14:50
 Aan: ICS support mailing
 Onderwerp: Re: [twsocket] Socket flushing
 
 Nobody knows???
 
 Eric
 
 -Mensagem Original-
 From: Éric Fleming Bonilha
 Sent: Friday, July 22, 2011 5:35 PM
 To: ICS support mailing
 Subject: Re: [twsocket] Socket flushing
 
  What issues?
 
 It is a weird issue... it actually creates a stack overflow because in
 some
 parts of my app I need to call flush, and flush calls the messageloop
 and on
 messageloop some timer routines are called that enters again on the
 same
 routine to flush the socket! it is complicated... and only happened
 once but
 it can happen...
 
  Good question :) This dates from 1994...
 
 Hum, does anybody remember? I was just wondering if this routine could
 enter
 on an infinite loop, if there is no way to enter on an infinite loop I
 will
 remove the MessageLoop call from my derivate class
 
 
 Best Regards
 Eric
 
 --
 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

--
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] Socket flushing

2011-07-22 Thread Wilfried Mestdagh
 I´m having some issues with socket flushing due to the messageloop that

What issues?

 What is the purpose of calling MessagePump over here?

Good question :) This dates from 1994...

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.be

 -Oorspronkelijk bericht-
 Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
 Namens Éric Fleming Bonilha
 Verzonden: donderdag 21 juli 2011 22:30
 Aan: ICS support mailing
 Onderwerp: [twsocket] Socket flushing
 
 Hi
 
 I´m having some issues with socket flushing due to the messageloop that
 it calls:
 
 procedure TCustomWSocket.Flush;
 begin
 while (FHSocket  INVALID_SOCKET) and { No more socket   }
   (not bAllSent) do begin  { Nothing to send  }
 { Break; }
 TryToSend;
 MessagePump;
 end;
 end;
 
 If I override the Flush method and remove the messagePump in my derived
 socket class:
 
 procedure TMySocket.Flush;
 begin
 while (FHSocket  INVALID_SOCKET) and { No more socket   }
   (not bAllSent) do begin  { Nothing to send  }
 { Break; }
 TryToSend;
 end;
 end;
 
 What consequences I will have? Does this routine has the possibility to
 enter on a never ending loop without the MessagePump call?
 What is the purpose of calling MessagePump over here?
 
 Thanks
 Eric
 --
 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] how to legally close and free client

2011-07-21 Thread Wilfried Mestdagh
 When I call Client.Close the Client will be freed automatically
 (destructor of Client will be called)?

Yes. Sidenote: if you do this from withing an event then call CloseDelayed.

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.be


 -Oorspronkelijk bericht-
 Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
 Namens Lukas Skala
 Verzonden: donderdag 21 juli 2011 20:23
 Aan: twsocket@elists.org
 Onderwerp: Re: [twsocket] how to legally close and free client
 
 
 hello,
 thank for quick and useful response.
 i'll try to upgrade to V7 now because i'm still getting error (catched
 by
 Server.OnBgException event), I'm getting AccessViolation or
 InvalidOperation exceptions.
 These errors occurs after disconnecting client by server (i'm using
 timer - in same way as you adviced me). I have tried to add C.Free call
 but I have thought it was nonse (you have confirmed it me).
 
 One question for sure:
 
 When I call Client.Close the Client will be freed automatically
 (destructor of Client will be called)?
 
 thank you again
 have a nice day
 lukas skala
 
 
 
 Dne 21.7.2011 17:29, Arno Garrels napsal(a):
   Lukas Skala wrote:
   hello,
   I have server application based on TWSocketServer, clients are
 derived
   from TWSocketClient class.
   I need disconnect inactive clients. I'm not sure how to disconnect
   client, I'm using this:
 
   procedure DisconnectMyClient(i: Integer);
   var
  C: TTcpSrvClient;
  {TTcpSrvClient = class(TWSocketClient)}
   begin
   C := Server.Client[I] as TTcpSrvClient;
   C.Close;
   That works, though Server.Client[I].Close would be enough.
 
   If want to close clients while iterating over the client list
   make sure you iterate from high index down to zero like:
 
   for I := Server.ClientCount -1 downto 0 do
  Server.Client[I].Close;
 
   A more brutal method to enforce client close was
   Server.Disconnect().
 
   C.Free; {Is this correct? sometimes it will throw access violation
   here} end;
   That's wrong, don't do that. Client objects are freed and
   removed from the internal client list when they are closed
   or disconnected automatically by the server.
 
 
   I'm using ICS v6.
   You should update to ICSv7.
 
   I did notice that Server.OnClientDisconnect event is not triggered
   when client is not closed correctly (e.g. client is plugged of
   ethernet).
   That's the expected behaviour.
 
   Is there any possibility to detect and/or disconnect these
   clients automatically?
   Implement an idle timeout at the server side. Let the client send
   some keep alive data in intervals so the server knows a client is
   still there.
 
 
 
 
 
 
 
 --
 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] TWSocket OnSessionAvailable problem

2011-07-20 Thread Wilfried Mestdagh
Hi,

Maybe too many sockets in TIME_WAIT? You can chech this with netstat -a

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.be


 -Oorspronkelijk bericht-
 Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
 Namens mfisc...@bfe.tv
 Verzonden: woensdag 20 juli 2011 11:44
 Aan: twsocket@elists.org
 Onderwerp: [twsocket] TWSocket OnSessionAvailable problem
 
 
 
 Hi,
 i am using the Standard TWSocket in a Server and round about 30 Clients
 in
 LineMode. After a Client is connected to the Server, the Client starts
 immediately to send text messages. After some sort of filtering the
 messages
 are broadcasted to a subset of all connected Clients. If i start the
 sever and
 30 clients through a script on a single Windows 7 PC the following
 error
 occurs: After 23-26 Clients get connected, the server no longer calls
 the
 callback function for OnSessionAvailable, but at client-side the
 callback for
 OnSessionConnected is still activated and the ClientSocket stays in
 state
 wsConnected. If i look at TCPView the corresponding Connection has the
 state
 Established. OnError or OnBGException are not called and the Socket
 is still
 in listening-State. If the Listening  Socket is Destroyed and
 recreated
 everything works in a certain way. Any idea in which direction my
 problem
 could be located?
 Thanks,
  M. Fischer
 --
 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] Showstopped bug in ICS

2011-07-05 Thread Wilfried Mestdagh
Hi Eric,

 I know, but if you still call OnDataAvailable with current socket
 options,
 for the ones that has not set wsoNoReceiveLoop (By default) the
 behaviour
 will still be the same right... for the ones that has set
 wsoNoReceiveLoop
 (like me) OnDataAvailable will still be called, and if I can afford to
 lose
 the packets 

But it will break existing code that depents on this behaviour if
wsoNoReceiveLoop is set. But you can easely derive from TWSocket and
override do_fd_close method. Then it will behave good for your
specifications and you will never have to change code again after updates.

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.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] Showstopped bug in ICS

2011-07-02 Thread Wilfried Mestdagh
 I know this is by design, but I believe that is why you have added
 wsoNoReceiveLoop so we don´t have to receive data in OnDataAvailable...

No this is addes to get out of a closed loop in case of users had slow code
to process fast data.

 software wasn´t being able to process over 150mbits of incomming data
 because the data from all sockets were being read from a single thread.

It is easy to handel that amout of data in 1 thread. If processing is slow
(for example because it needs slow queries of database) then pass it to a
worker thread.

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.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] Showstopped bug in ICS

2011-07-01 Thread Wilfried Mestdagh
Hi,

 it is expecting that my
 event handler DO receive the data (But it doesn´t) and then, it locks
 up on a loop!

You have to receive the available data in the OnDataAvailable event handler.
This is by design. If you want to process the data in another thread then
the most obvious is that you receive the data in the event handler and then
pass it to the other thread.

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.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] Memory leak in ICS Client socket

2011-07-01 Thread Wilfried Mestdagh
Hi

 RecStream := TMemoryStream.Create;

If you have a memory leak in this code fragment then you probably forgot to 
free the stream.

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.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] Repair Connection?

2011-05-27 Thread Wilfried Mestdagh
Hi,

No you cannot repair lower layers. There could be a hardware problem or a
driver problem. But I think you should be able to connect again without quit
/ restart the application.

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.be

 -Oorspronkelijk bericht-
 Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
 Namens David Bridges
 Verzonden: donderdag 26 mei 2011 16:37
 Aan: twsocket@elists.org
 Onderwerp: [twsocket] Repair Connection?
 
 I use the TWSocket and TWSocketServer components to implement
 communication between a host and client computers.  Sometimes things
 get
 in a state where the client will fail to connect to the host no matter
 how many times it is attempted.  Exiting the software, repairing the
 local area connection (under XP) and restarting the software *always*
 solved this problem.  Now there is no repair function anymore in
 Windows
 and I'm wondering anyway if there is a function in the components that
 can be called that might clear this problem up?  Is anyone else
 familiar
 with this problem or is it just me?
 
 David
 --
 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] Connected when not connected

2011-05-03 Thread Wilfried Mestdagh
Hi,

This is how winsock works. OnSessionConnected is fired with an error, after
it OnSessionClosed is fired with or without an error. You should use the
events in how to access the component.

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.be

 -Oorspronkelijk bericht-
 Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
 Namens Piotr Dalek
 Verzonden: dinsdag 3 mei 2011 11:22
 Aan: TWSocket
 Onderwerp: [twsocket] Connected when not connected
 
 Hello.
 
 In WSocket's DO_FD_CONNECT procedure, the socket state is set to
 wsConnected
 even if the socket has failed to connect (for example, on 10061 error),
 then
 the SessionConnected handler is called and after that, check for actual
 error is performed, where socket is closed when error is not zero (like
 10061). Im not sure if this is correct - shouldn't be the error
 checking
 performed first?
 
 I'm asking because I have some code that checks for TWSocket's state to
 access some of the properties. In some cases it's possible that when
 socket's State is wsConnect, my code accesses, among other things,
 GetPeerPort and GetXPort which results in exceptions because socket is
 not
 actually connected.
 
 --
 Piotr Dałek
 enigmati...@interia.pl
 
 -
 Dzwon tanio!
 Sprawdz  http://linkint.pl/f29a1
 
 --
 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] SPF records

2011-05-02 Thread Wilfried Mestdagh
Hello,

I have an SMTP server receiving mail to be send by SMS. I have to implement
SPF record verification. I think with this information I can at least verify
that the SMTP client who connect is the one who he claims to be.

But where and how can I grab SPF records? Did somebody already written some
code for this?

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.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] SPF records

2011-05-02 Thread Wilfried Mestdagh
Hi Angus,

Thank you for reply and usefull information. I'm in the stage of price for
customer but if I get my hands into it there sure will be ICS example :)

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.be


 -Oorspronkelijk bericht-
 Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
 Namens Angus Robertson - Magenta Systems Ltd
 Verzonden: maandag 2 mei 2011 15:39
 Aan: twsocket@elists.org
 Onderwerp: Re: [twsocket] SPF records
 
  I have to implement SPF record verification.
 
 It would be useful addition for ICS, particularly for POP3.
 
  But where and how can I grab SPF records?
 
 Using OverbyteIcsDnsQuery with DnsQueryTXT to get DNS text strings.
 
 Text Query for bbc.co.uk: v=spf1 ip4:212.58.224.0/19 ip4:132.185.0.0/16
 ip4:78.136.53.80/28 ip4:78.136.14.192/27 ip4:78.136.19.8/29
 ip4:89.234.10.72/29 ip4:89.234.53.236 ?all.ns1.rbsov.bbc.co.uk
 
 Then parse the IP and subnet masks, check the origination IP is listed.
 
 But many domains don't have spf records, so you may want some fuzzy
 logic
 to check reverse DNS of the sending server, and see if it matches the
 email address, ie my mail comes from mail.magsys.co.uk which is a good
 match for my email address.  I've been meaning to set-up spf for years,
 never got around to it.
 
 Angus
 
 --
 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] property editor for LineEnd broken in Delphi XE

2011-04-18 Thread Wilfried Mestdagh
Hi Arno,

 It wasn't registered for the correct string type

Yes this fix is working fine.

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.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] UDP receive issue from a Windows service

2011-04-18 Thread Wilfried Mestdagh
Hi Francois,

 Actually the service is a dual mode service/app console and it works
 perfectly well as a console application (and also as a service when a
 debugger is attached).

I do not understand the 'dual mode' but could that be a reason? What happens
if you put your application into 1 object (no console interaction), then
create/run it in a console application then create/run it in a NT service
application?

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.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] UDP receive issue from a Windows service

2011-04-18 Thread Wilfried Mestdagh
Hi Francois,

 A dual mode service is an application which detect if it run as a
 service

I understeand. I did the same concept years ago 

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.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] property editor for LineEnd broken in Delphi XE

2011-04-17 Thread Wilfried Mestdagh
Hi,

I just discovered that the property editor for LineEnd is broken using
Delphi XE. No big deal for me as I always create TWSocket at runtime. I
don't know how much work it is. If someone can give some hint maybe I find
the time to work on it.

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.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] ICS latest version for Delphi XE

2011-03-18 Thread Wilfried Mestdagh
Hi,

I just installed Delphi XE pro. Is http://wiki.overbyte.be/arch/icsv7w.zip
the latest version for ICS?

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.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] Trying POP3 proxy but loosing lines

2011-02-25 Thread Wilfried Mestdagh
Hello,

 I  fixed  the  problem  but  I  don't  understand why it did as what I
 changed   should   not  have  chaneg  anything,  I  only  removed  the
 ReceiveStr()   loop 

The design is that this method only be called 1 time in OnDataAvailable. So
by calling it multiple times you are in an untested situation.

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.be


 -Oorspronkelijk bericht-
 Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
 Namens Dod
 Verzonden: vrijdag 25 februari 2011 10:35
 Aan: ICS support mailing
 Onderwerp: Re: [twsocket] Trying POP3 proxy but loosing lines
 
 Hello,
 
 I  fixed  the  problem  but  I  don't  understand why it did as what I
 changed   should   not  have  chaneg  anything,  I  only  removed  the
 ReceiveStr()   loop   (as   it  is  useless  with  linemode:=true)  in
 OnDataAvailable,  but  why  did  it  fix  the problem as this loop was
 basically useless, now I have :
 
 procedure TPOPOut.POPOutDataAvailable(Sender: TObject; ErrCode: Word);
 begin
   StringRLine := TPOPOut(sender).ReceiveStr;
   TPOPOut(sender).POPIn.SendStr(StringRLine);
 end;
 
 Bad procedure :
 
 procedure TPOPOut.POPOutDataAvailable(Sender: TObject; ErrCode: Word);
 begin
   StringRLine := TPOPOut(sender).ReceiveStr;
   while (Length(StringRLine)  0)
   begin
 TPOPOut(sender).POPIn.SendStr(StringRLine);
 StringRLine := TPOPOut(sender).ReceiveStr;
   end;
 end;

--
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] SocketSpy to C++ Problem

2011-01-22 Thread Wilfried Mestdagh
Hi,

 Sorry again, Francois told me and I missed it.
 https://www.quicksilvermail.net/socketspyc.zip

Glad it is solved :)

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.be

 -Oorspronkelijk bericht-
 Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
 Namens Richard Christman
 Verzonden: zaterdag 22 januari 2011 9:45
 Aan: twsocket@elists.org
 Onderwerp: [twsocket] SocketSpy to C++ Problem
 
 Hi All,
 
 Sorry again, Francois told me and I missed it.
 
 https://www.quicksilvermail.net/socketspyc.zip
 
 I have done a cbuilder translation of Mr. Mestdagh's SpocketSpy
 program.
 But, I have a problem. When I run the program and try to connect with a
 server, I get this immediate error:
 
 An unknown response was received in response to a request for
 information
 from the news server 'SocketSpyC++ Local TCP Proxy'
 
 Under the details button of the error dialog, I get:
 
 SocketSpyC++ Local TCP Proxy
 
 Configuration:
Account: SocketSpyC++ Local TCP Proxy
Server: 127.0.0.1
Protocol: NNTP
Port: 119
Secure(SSL): 0
Code: 800ccca0
 
 I don't have any idea what the problem is. First, while trying to
 debug, I
 put a popup messagebox at the end of the WSocketServerClientConnect
 procedure to take a look at a variable. What I discovered was that
 messagebox being open allowed the program to actually connect and go
 further
 before error. After that, I replaced the messagebox with an
 Application-ProcessMessages() loop as a test. I was amazed that after
 that,
 the program ran completely and reliably--everytime. It works just
 great, but
 I haven't tried more than 1 connection because of the ProcessMessages
 loop.
 Though the loop has been helpful, I doubt it is the appropriate fix for
 this.
 
 My socketspyc project is attached. Please have a look. The
 ProcessMessages
 loop is at the end of the WSocketServerClientConnect procedure.
 
 Regards,
 
 Richard Christman
 https://www.quicksilvermail.net
 
 --
 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] client problem

2010-05-04 Thread wilfried Mestdagh
Hi,

Do you reconnect in the OnClose event?
If so do it outside it by posting a message to a custom message handler.

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be


-Oorspronkelijk bericht-
Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] Namens
A Drent
Verzonden: dinsdag 4 mei 2010 15:50
Aan: ICS support mailing
Onderwerp: Re: [twsocket] client problem

I managed to solve this issue, point was that the banner is alway sent and I

was closing the socket while data was still sent. I'm  now closing the 
socket at the right time and this works well now (verified on server).

However another problem arises. If I reconnect I get a WSAAsyncSelect 
exception.

Invalid argument (#10022 in WSAAsyncSelect)

from the line
   SocketError('WSAAsyncSelect');

in OverbyteICSSocket.

Now this realy puzzles me. I've waited for all the events to occur before 
closing the socket. I wait for the event that the socket is closed. Then I 
want to send new data, the socket is filled with the correct parms, 
connected and... the error. Anybody knows why?

albert

- Original Message - 
From: A Drent a.dr...@aducom.com
To: twsocket@elists.org
Sent: Tuesday, May 04, 2010 12:11 PM
Subject: [twsocket] client problem


I have a small webapplication who needs to connect to several servers 
depending on the data sent. The response of this server will be send back 
to the end-user. The server responds well. If I use the clientdemo it all 
works as expected.

 However, in my webapplication things go wrong while the code is straight 
 forward like the clientdemo. There are only a few things differently: I 
 need a synchronous call. So I have to wait until the ondatasent has 
 finished. On this event I set a status bit to allow the application to go 
 on. The first time it works, the second time, it doesn't, the third time 
 it works, etc.

 I'm using the messagepump of the clientsocket to wait:

 function TWebModule5.BuildUDDI : string;
 begin
   bMsgOk := false;
   while not bMsgOk do begin
  CliSocket.MessagePump;
  sleep(100);
   end;
   result := Buffer;
 end;

 I'm sure I'm doing things wrong. Hints?

 albert
 --
 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

--
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] WSAECONNABORTED (10053) when connecting to server

2010-04-27 Thread wilfried Mestdagh
Hi Anton,

Never had that issue, but can you First disable  all firewall and
virusscanner on the machine where you run the application and try again?

-- 
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be


-Oorspronkelijk bericht-
Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] Namens
Anton Sviridov
Verzonden: dinsdag 27 april 2010 12:00
Aan: twsocket@elists.org
Onderwerp: [twsocket] WSAECONNABORTED (10053) when connecting to server

Hello all,
I faced strange issue in my app. I develop an application which opens ~15
connections to several servers, ~3-5 connections per server. After
establishing the connection it receives data flow.
But when I start it, some connections fail with WSAECONNABORTED (10053) -
and the oddest thing is that they fail after receiving some data. Reconnect
after 5 sec pause works fine.

I asked our admin, but he says the PC which my app runs on has no
restrictions on the router at all. Moreover, I have no problem on my own PC
with XP (PC where I run app has W2003 server). So it is unlikely bug in my
or ICS code.

I found description of MS bug here:
http://support.microsoft.com/?kbid=931319 and applied the patch provided,
but it only turned the things worse so I uninstalled it.

Do you have any advice? Maybe someone have already faced with such issue?

-- 
Anton
--
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] Multiple FTP Clients

2010-04-16 Thread wilfried Mestdagh
Hi Graham,

Yes TFileStream will use disk. If you have only small transfers you can do
as you do now. If you worry about speed then you could gain speed a lot by
using pointers to your own memory location instead of TStream.

-- 
mvg, Wilfried
http://www.mestdagh.biz


-Oorspronkelijk bericht-
Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] Namens
GRAHAM (Deephaven)
Verzonden: vrijdag 16 april 2010 8:30
Aan: 'ICS support mailing'
Onderwerp: Re: [twsocket] Multiple FTP Clients

Doesn't TFileStream imply that the data will be transferred to the disk. I
want to avoid any disk activity and get the data as fast as possible into
the application. The size of any data transfer will only be a few tens of
kilobytes at most.

Graham

-Original Message-
From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] On
Behalf Of Francois PIETTE
Sent: 16 April 2010 05:56
To: ICS support mailing
Subject: Re: [twsocket] Multiple FTP Clients

 easier to use the multiple FTP clients to solve my problem.

 The first attempt seems to have a problem (problem something stupid I'm
 doing). I have 2 FTP clients and created 2 memory streams. If both FTP
 clients connect and then disconnect, when I free the second memory stream 
 I
 get an error. If only one FTP client connects and disconnects, I can free
 both memory streams.

 Obviously doing something dim.

There is a bug in your code obviously. You are probably referencing the 
wrong stream.
btw: Usually one use TFileStream for FTP because you have potentially very 
large files which could result in out of memory errors if you use a 
TMemoryStream.

--
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

--
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] InternalAbort causes OnDataAvailable *during* the Abort call

2010-03-27 Thread wilfried Mestdagh
Hi,

 To clarify, OnDataAvailable has received complete data, say:
 help\n
 In processing that data, an exception occurs and TWSocket.Abort is called
to
 abort the connection.  Before .Abort returns, OnDataAvailable is called
 again, with the exact same that was already being processed:

These are possible untested situations. It is possible to call Abort from
within an event, but why should you call Abort if the session is closed? 

-- 
mvg, Wilfried
http://www.mestdagh.biz

-Oorspronkelijk bericht-
Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] Namens
Jon Robertson
Verzonden: vrijdag 26 maart 2010 9:03
Aan: ICS support mailing
Onderwerp: Re: [twsocket] InternalAbort causes OnDataAvailable *during* the
Abort call

On Fri, Mar 26, 2010 at 2:46 AM, Jon Robertson
jon.robert...@pobox.comwrote:

 In fact, OnDataAvailable has already been called with the exact same data.
 If OnDataAvailable is called twice with the same data, but the data was
only
 received once, I consider that a bug.


To clarify, OnDataAvailable has received complete data, say:
help\n

In processing that data, an exception occurs and TWSocket.Abort is called to
abort the connection.  Before .Abort returns, OnDataAvailable is called
again, with the exact same that was already being processed:
help\n

But the client has only sent the data once.

-- 
Jon Robertson
Borland Certified Advanced Delphi 7 Developer
Good programming is 40% experience, 30% skill, 20% RTFM, 10% caffeine, and
5% attention to detail.
--
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] UDP...

2010-03-24 Thread wilfried Mestdagh
Hi,

 WSocket1.Addr:='192.168.1.2';
 WSocket1.port:='9600';
 I get an error 10049. 
Means you cannot bind to that address. '192.168.1.2' is the address on the
remote machine, you can not listen on that.

 The only difference I can see is the sending local port number is not
9600.

This should make no difference. You can set local port of course. There is a
property for that.

-- 
mvg, Wilfried
http://www.mestdagh.biz

-Oorspronkelijk bericht-
Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] Namens
zayin
Verzonden: woensdag 24 maart 2010 1:12
Aan: twsocket@elists.org
Onderwerp: [twsocket] UDP...

Hello,

I ran into this a couple years ago and I found a work around so I dropped
it. Now, new computer, new OS, new task. So, any reasons for my failure that
might have been computer/OS related are...

I am using Wireshark to verify what I am seeing.

Using D2007 and ICS version 5.25, UDP with TWSocket.

When I call 'Listen' after setting:

WSocket1.Addr:='192.168.1.2';
WSocket1.port:='9600';

I get an error 10049. Then of course if I send some bytes I get a 10057
error.

When I call 'Connect' after setting:

WSocket1.Addr:='192.168.1.2';
WSocket1.port:='9600';

I can send the bytes and Wireshark shows them as transmitted and I get a
reply from 192.168.1.2.

The reply I get back indicates there is an error in the bytes. I KNOW the
bytes are correct. The device also supports TCP with the same bytes and when
I use TCP all is good. I have other software, I did not create, and it works
with UDP using the same byte stream.

The only difference I can see is the sending local port number is not 9600.
I am not sure why that matters. The software that does work does have a
local port number of 9600. And after hours, that is the only difference I
can see.

The source is below and I can upload a project if someone needs it.

Any ideas? What am I missing?

Ciao,

Mark

unit Main;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, WSocket, IcsLogger;

type
  TForm2 = class(TForm)
Memo1: TMemo;
WSocket1: TWSocket;
ListenStartBtn: TButton;
ListenStopBtn: TButton;
Label1: TLabel;
Label2: TLabel;
ConnectStartBtn: TButton;
StopConnectBtn: TButton;
IcsLogger1: TIcsLogger;
procedure ListenStartBtnClick(Sender: TObject);
procedure WSocket1Error(Sender: TObject);
procedure WSocket1SessionConnected(Sender: TObject; ErrCode: Word);
procedure WSocket1SessionClosed(Sender: TObject; ErrCode: Word);
procedure WSocket1DataAvailable(Sender: TObject; ErrCode: Word);
procedure ListenStopBtnClick(Sender: TObject);
procedure ConnectStartBtnClick(Sender: TObject);
  private
holdingBuff:array [0..2048] of byte;
  public
{ Public declarations }
  end;

var
  Form2: TForm2;

implementation

{$R *.dfm}

var
 outBuffer:array [0..17] of byte =
($80,$00,$02,$00,$02,$00,$00,$04,$00,$03,$01,$01,$B0,$00,$00,$00,$00,$01);

procedure TForm2.ConnectStartBtnClick(Sender: TObject);
begin
 Memo1.Lines.Add('');
 Memo1.Lines.Add('ConnectStartBtnClick');
 WSocket1.Addr:='192.168.1.2';
 WSocket1.port:='9600';
 Memo1.Lines.Add('Connect');
 WSocket1.Connect;
 Memo1.Lines.Add('Send');
 WSocket1.Send(@outBuffer,18);
end;

procedure TForm2.ListenStartBtnClick(Sender: TObject);
begin
 Memo1.Lines.Add('');
 Memo1.Lines.Add('ListenStartBtnClick');
 WSocket1.Addr:='192.168.1.2';
 WSocket1.port:='9600';
 Memo1.Lines.Add('Listen');
 WSocket1.Listen;
 Memo1.Lines.Add('Send');
 WSocket1.Send(@outBuffer,18);
end;

procedure TForm2.ListenStopBtnClick(Sender: TObject);
begin
 Memo1.Lines.Add('Stop');
 WSocket1.Close;
end;

procedure TForm2.WSocket1DataAvailable(Sender: TObject; ErrCode: Word);
var
 byteCount:integer;
begin
 if (ErrCode  0) then
  Memo1.Lines.Add('WSocket1DataAvailable: ' + IntToStr(ErrCode));

 Memo1.Lines.Add('WSocket1DataAvailable');
 byteCount:=WSocket1.Receive(@holdingBuff[0],sizeOf(holdingBuff));
 if (byteCount  1) then
  Exit;
 Memo1.Lines.Add(IntToStr(byteCount));
end;

procedure TForm2.WSocket1Error(Sender: TObject);
begin
 Memo1.Lines.Add('WSocket1Error: ' + IntToStr(WSocket1.LastError));
end;

procedure TForm2.WSocket1SessionClosed(Sender: TObject; ErrCode: Word);
begin
 if (ErrCode  0) then
  Memo1.Lines.Add('WSocket1SessionClosed: ' + IntToStr(ErrCode));
 Memo1.Lines.Add('WSocket1SessionClosed');
end;

procedure TForm2.WSocket1SessionConnected(Sender: TObject; ErrCode: Word);
begin
 if (ErrCode  0) then
  Memo1.Lines.Add('WSocket1SessionConnected: ' + IntToStr(ErrCode));
 Memo1.Lines.Add('WSocket1SessionConnected');
end;

end.

DFM---

object Form2: TForm2
  Left = 758
  Top = -807
  Caption = 'Form2'
  ClientHeight = 714
  ClientWidth = 667
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'Tahoma'
  Font.Style = []
  OldCreateOrder = False
  PixelsPerInch = 96
  TextHeight = 13
  object 

Re: [twsocket] Sending Buffer size

2010-03-17 Thread wilfried Mestdagh
Hi,

You use UDP and UDP respect packet boundary. So as soon winsock has receive
a complete packet then it will deliver to application.

-- 
mvg, Wilfried
http://www.mestdagh.biz


-Oorspronkelijk bericht-
Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] Namens
ed...@clanhay
Verzonden: woensdag 17 maart 2010 6:11
Aan: twsocket@elists.org
Onderwerp: [twsocket] Sending Buffer size

I have a UDP server supplying client data requests. The data returned can
have 1 of 2 priorities. I already have the priority algorithm worked out so
not a problem. 
My question is, how much data does twsocket/winsock hold?
i.e. If I have several low proiorty requests sending large amounts of data,
and get a high proioriy request , I want this high prioirty data to have as
little delay as possible to back to the client.

Edwin
--
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 function

2010-03-07 Thread wilfried Mestdagh
Hi Engi,

No the Receive method is not blocking. The method copy the already received
data with a maximum of what you give to it as size.

-- 
mvg, Wilfried
http://www.mestdagh.biz


-Oorspronkelijk bericht-
Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] Namens
Engi
Verzonden: dinsdag 2 maart 2010 9:42
Aan: ICS support mailing, 
Onderwerp: [twsocket] Receive function

Hi,

In TWSocketClient class, is the Receive function locking while 
BufferSize is not reached ?

TIA,
Engi

--
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] Concatenate multiple UDP packets

2010-01-11 Thread wilfried Mestdagh
Hi Dave,

In addition of the reply of Francois. If your receiver has no time receiving
an UDP packet (for example when it arrives when your application is busy
displaying it in the TRichEdit) then it will be trown away. That is nature
of UDP and probably the reason that you only receive 1 packet.

-- 
mvg, Wilfried
http://www.mestdagh.biz

--
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] OS TWSOCKET

2009-12-30 Thread wilfried Mestdagh
Hi,

The mails are automatically sent to every subscriber on the list. If you get
your mail with the same email address you will get all the mail
automatically.

-- 
mvg, Wilfried
http://www.mestdagh.biz


-Oorspronkelijk bericht-
Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] Namens
Signed SourceR Project
Verzonden: woensdag 30 december 2009 12:03
Aan: twsocket@elists.org
Onderwerp: Re: [twsocket] OS  TWSOCKET

On 30.12.2009 11:49, Francois PIETTE wrote:
 How can I set twsocket to get mails?

 If you use TWSocket you'll have to imlplement POP3/SMTP/NNTP 
 protocols. This has been done in POP3 client component to get emails, 
 SMTP client component to send emails and NNTP component to 
 send/receive messages in newsgroups. There are some demos.

 -- 
 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

Hi guys,
I am sorry,
I did mean the mailing list not the component.
I have just reinstalled everything in my machine and installed windows 7.
I also lost all my old mails from the twsocket.

Do I have to make any configuration to my thunderbird mail to get the 
posts of all the users?
Are they coming automatically?

thanks in advance

-daniel
--
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] Merry Christmas

2009-12-22 Thread wilfried Mestdagh
For me too a merry christmas an a happy new year!!!
And for next year interesting projects

-- 
mvg, Wilfried
http://www.mestdagh.biz


-Oorspronkelijk bericht-
Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] Namens
Signed Source® Project
Verzonden: dinsdag 22 december 2009 17:11
Aan: ICS support mailing
Onderwerp: [twsocket] Merry Christmas

Hello guys,

Merry christmas and happy new year  :)

Merry Navidad y feliz año nuevo :)

Lustig Christfest und eines glückliches Neujahr :)

Felice Natale e felice anno nuovo :)

Joyeux Noël et bonne année :)

??? ? ? ?? ? ??? :)

God Jul och glad Nyåren :)

Feliz Natal e feliz ano novo :)

Hilaris Sarcalogos quod gauisus novus annus :)

- daniel
--
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] Use of twsocket in thttpserver application

2009-12-08 Thread wilfried Mestdagh
Hi,

while sckCustScreen.State  wsclosed do
  Application.ProcessMessages;

No, use the State property only for displaying states, not to take action.
Also it is not a wise idea to put your application in a loop. Use OnClose
event of the socket. It will fire when it is close; in the OnClose event you
can post a message to a custom message handler to reconnect again.

-- 
mvg, Wilfried
http://www.mestdagh.biz


-Oorspronkelijk bericht-
Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] Namens
Chris Schofield
Verzonden: dinsdag 8 december 2009 9:45
Aan: 'ICS support mailing'
Onderwerp: Re: [twsocket] Use of twsocket in thttpserver application

Hi 

Many thanks for all the replies. This is a really great mailing list

I am using application.processmessages because I need to connect to several
different sockets as follows

  for i := 1 to CustScreenCount do begin
while sckCustScreen.State  wsclosed do
  Application.ProcessMessages;
sckCustScreen.Addr := HttpServer1.Addr;
sckCustScreen.Port := IntToStr(51000 + i);
try
  sckCustScreen.Tag := 1;
  timSocket.Enabled := True;
  sckCustScreen.Connect;
except
end;
  end;

The connected event closes the connection.  My timer aborts the connection
if it takes too long.

I have put a single twsocket on my form and I am trying to reuse it.
Everybody has told me that the application.processmessages is very bad.

Any ideas on the best way for my program to be coded to do what I want?

Regards
Chris

-Original Message-
From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] On
Behalf Of Angus Robertson - Magenta Systems Ltd
Sent: 07 December 2009 15:46
To: twsocket@elists.org
Subject: Re: [twsocket] Use of twsocket in thttpserver application

 Each time my webserver needs to nudge one of the other 
 applications then I guess I should start a thread to do this.

Why do you need a thread?  If you call connect to open a socket to the
other application, it will eventually give a connect event with fail or
success, from which you can trigger some other action if necessary. 

Look in OverbyteIcsWebAppServerMailer.pas which uses illustrates sending
email from a web page, using a series of events.  

Angus

--
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

--
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] OverbyteIcsPingTst

2009-11-20 Thread Wilfried Mestdagh
Hello Signed,

Can you ping your local machine (127.0.0.1)?
Can you ping both with the command interpreter?

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Thursday, November 19, 2009, 20:39, Signed Source® Project wrote:

 Hi guys,
 I have just tested -- OverbyteIcsPingTst which is delivered with v7 and 
 noticed,
 It does not ping anything!!

 Here is what I get...
 :
 Resolving host 'www.google.com'
 Host 'www.google.com' is 74.125.79.105
 Sending 56 bytes to 74.125.79.105 (74.125.79.105)
 Cannot ping host (74.125.79.105) : Request timed out. Status = 11010
 :

 It is doing the same for whatever I try.
 Any ideas?

 -daniel
 --
 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] OverbyteIcsPingTst

2009-11-20 Thread Wilfried Mestdagh
Hi Daniel,

Please email me private the compiled exe file. I have several OS here,
if you want I try it. The example should ping everything. Please zip the
exe before sending.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Friday, November 20, 2009, 15:01, Signed Source® Project wrote:

 Hi Dave,
 I am using Vista and I can ping anything from the CMD succesfully.
 I don't think there is any firewall security problem.
 I am trying to ping -- www.google.com
 Pinging google works always in any place as long as there is a network
 connection.

 I did not made any modifications to the demo and trying just as it is.
 Isn't it supposed to ping?
 or is it made to ping just the localhost?

 -daniel

 - Original Message - 
 From: Dave Baxter d...@uk-ar.co.uk
 To: ICS support mailing twsocket@elists.org
 Sent: Friday, November 20, 2009 3:42 PM
 Subject: Re: [twsocket] OverbyteIcsPingTst


 Hi..

 What operating system?

 Have you given any local firewall/secruity system permission for the
 ping test program to do what it needs?

 That is, use the machines networking resources.

 Cheers.

 Dave B.


 -Original Message-
 From: Signed Source(r) Project [mailto:dan...@signedsource.com]
 Sent: 20 November 2009 11:17
 To: ICS support mailing
 Subject: Re: [twsocket] OverbyteIcsPingTst

 Hi Wilfried,
 Many thanks for the response.
 Yes, i can ping anything from the command window and they all
 are answering.
 From PingTst I can ping only and only localhost and it gives this.
 ..
 ..
 Resolving host 'localhost'
 Host 'localhost' is 127.0.0.1
 Sending 56 bytes to 127.0.0.1 (127.0.0.1) Received 56 bytes
 from 127.0.0.1 in 0 msecs
 ..
 
 Whats the use of this if it isn't pinging anything else?

 -daniel

 - Original Message -
 From: Wilfried Mestdagh wilfr...@mestdagh.biz
 To: ICS support mailing twsocket@elists.org
 Sent: Friday, November 20, 2009 12:55 PM
 Subject: Re: [twsocket] OverbyteIcsPingTst


 Hello Signed,

 Can you ping your local machine (127.0.0.1)?
 Can you ping both with the command interpreter?

 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz

 Thursday, November 19, 2009, 20:39, Signed Source(r) Project wrote:

  Hi guys,
  I have just tested -- OverbyteIcsPingTst which is
 delivered with v7 and
  noticed,
  It does not ping anything!!

  Here is what I get...
 
 ::
 :::
  Resolving host 'www.google.com'
  Host 'www.google.com' is 74.125.79.105
  Sending 56 bytes to 74.125.79.105 (74.125.79.105)
  Cannot ping host (74.125.79.105) : Request timed out. Status = 11010
 
 ::
 :::

  It is doing the same for whatever I try.
  Any ideas?

  -daniel
  --
  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



 --
 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

--
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] OverbyteIcsPingTst

2009-11-20 Thread Wilfried Mestdagh
Hello Daniel,

I tryed thencompiled exe mailed to me from Daniel in 3 machines, on NT4,
on XP-pro, and on Vista-64bit. All 3 returns more or less same result,
here copy of the result:

Resolving host 'www.overbyte.be'
Host 'www.overbyte.be' is 193.200.60.61
Sending 56 bytes to 193.200.60.61 (193.200.60.61)
Received 56 bytes from 193.200.60.61 in 20 msecs

So I hope someone else can give some idea here. Your compilation is OK,
that is for sure. But wy it does not work on your Vista machine is for
me also a question.

security, rights, firewall?  but if so wy does the Ping command works
for Daniel in command interpreter?

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Friday, November 20, 2009, 15:01, Signed Source® Project wrote:

 Hi Dave,
 I am using Vista and I can ping anything from the CMD succesfully.
 I don't think there is any firewall security problem.
 I am trying to ping -- www.google.com
 Pinging google works always in any place as long as there is a network
 connection.

 I did not made any modifications to the demo and trying just as it is.
 Isn't it supposed to ping?
 or is it made to ping just the localhost?

 -daniel

 - Original Message - 
 From: Dave Baxter d...@uk-ar.co.uk
 To: ICS support mailing twsocket@elists.org
 Sent: Friday, November 20, 2009 3:42 PM
 Subject: Re: [twsocket] OverbyteIcsPingTst


 Hi..

 What operating system?

 Have you given any local firewall/secruity system permission for the
 ping test program to do what it needs?

 That is, use the machines networking resources.

 Cheers.

 Dave B.


 -Original Message-
 From: Signed Source(r) Project [mailto:dan...@signedsource.com]
 Sent: 20 November 2009 11:17
 To: ICS support mailing
 Subject: Re: [twsocket] OverbyteIcsPingTst

 Hi Wilfried,
 Many thanks for the response.
 Yes, i can ping anything from the command window and they all
 are answering.
 From PingTst I can ping only and only localhost and it gives this.
 ..
 ..
 Resolving host 'localhost'
 Host 'localhost' is 127.0.0.1
 Sending 56 bytes to 127.0.0.1 (127.0.0.1) Received 56 bytes
 from 127.0.0.1 in 0 msecs
 ..
 
 Whats the use of this if it isn't pinging anything else?

 -daniel

 - Original Message -
 From: Wilfried Mestdagh wilfr...@mestdagh.biz
 To: ICS support mailing twsocket@elists.org
 Sent: Friday, November 20, 2009 12:55 PM
 Subject: Re: [twsocket] OverbyteIcsPingTst


 Hello Signed,

 Can you ping your local machine (127.0.0.1)?
 Can you ping both with the command interpreter?

 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz

 Thursday, November 19, 2009, 20:39, Signed Source(r) Project wrote:

  Hi guys,
  I have just tested -- OverbyteIcsPingTst which is
 delivered with v7 and
  noticed,
  It does not ping anything!!

  Here is what I get...
 
 ::
 :::
  Resolving host 'www.google.com'
  Host 'www.google.com' is 74.125.79.105
  Sending 56 bytes to 74.125.79.105 (74.125.79.105)
  Cannot ping host (74.125.79.105) : Request timed out. Status = 11010
 
 ::
 :::

  It is doing the same for whatever I try.
  Any ideas?

  -daniel
  --
  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



 --
 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

--
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] OverbyteIcsPingTst

2009-11-20 Thread Wilfried Mestdagh
Hello Daniel,

I cannot answer your question direcly, but many off the security things
that are developed are only a pain in the back for a developer because
they are bad designed. They block things that should not be blocked
without giving a proper error report. Even worse: Norton and Norman
antivirus (and for sure more of them) are even giving wrong winsock
errors (very nice if you develop).

So for many years I have deleted all these shit on my develop machines.
So at least I can develop without having other software interfering. (I
still use an open sourse virus scanner to stay protected).

Second is a test phase with popular security software enabled. Then the
trouble begins, but at least then I know my software is working and it
is other bad designed software that is interfering.

I know this does not answer your question, it only tell's you that there
is a main security problem.

Did you know that when you installed some spyware/virus software that it
even is impossible to compile a Delphi program? (only 1 issue: gives
internal errors in Delphi)...

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Friday, November 20, 2009, 21:05, Signed Source® Project wrote:

 Hi guys,
 Thanks to Wilfried for testing :)
 Meanwhile,
 I have tested by disabling my ESET smart security and it works well.

 Now,
 Why the ping test cannot ping but CMD can when the ESET smart security is
 on?
 Am I missing something?

 - daniel

 - Original Message - 
 From: Wilfried Mestdagh wilfr...@mestdagh.biz
 To: ICS support mailing twsocket@elists.org
 Cc: Signed Source® Project dan...@signedsource.com
 Sent: Friday, November 20, 2009 9:41 PM
 Subject: Re[2]: [twsocket] OverbyteIcsPingTst


 Hello Daniel,

 I tryed thencompiled exe mailed to me from Daniel in 3 machines, on NT4,
 on XP-pro, and on Vista-64bit. All 3 returns more or less same result,
 here copy of the result:

 Resolving host 'www.overbyte.be'
 Host 'www.overbyte.be' is 193.200.60.61
 Sending 56 bytes to 193.200.60.61 (193.200.60.61)
 Received 56 bytes from 193.200.60.61 in 20 msecs

 So I hope someone else can give some idea here. Your compilation is OK,
 that is for sure. But wy it does not work on your Vista machine is for
 me also a question.

 security, rights, firewall?  but if so wy does the Ping command works
 for Daniel in command interpreter?

 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz

 Friday, November 20, 2009, 15:01, Signed Source® Project wrote:

 Hi Dave,
 I am using Vista and I can ping anything from the CMD succesfully.
 I don't think there is any firewall security problem.
 I am trying to ping -- www.google.com
 Pinging google works always in any place as long as there is a network
 connection.

 I did not made any modifications to the demo and trying just as it is.
 Isn't it supposed to ping?
 or is it made to ping just the localhost?

 -daniel

 - Original Message - 
 From: Dave Baxter d...@uk-ar.co.uk
 To: ICS support mailing twsocket@elists.org
 Sent: Friday, November 20, 2009 3:42 PM
 Subject: Re: [twsocket] OverbyteIcsPingTst


 Hi..

 What operating system?

 Have you given any local firewall/secruity system permission for the
 ping test program to do what it needs?

 That is, use the machines networking resources.

 Cheers.

 Dave B.


 -Original Message-
 From: Signed Source(r) Project [mailto:dan...@signedsource.com]
 Sent: 20 November 2009 11:17
 To: ICS support mailing
 Subject: Re: [twsocket] OverbyteIcsPingTst

 Hi Wilfried,
 Many thanks for the response.
 Yes, i can ping anything from the command window and they all
 are answering.
 From PingTst I can ping only and only localhost and it gives this.
 ..
 ..
 Resolving host 'localhost'
 Host 'localhost' is 127.0.0.1
 Sending 56 bytes to 127.0.0.1 (127.0.0.1) Received 56 bytes
 from 127.0.0.1 in 0 msecs
 ..
 
 Whats the use of this if it isn't pinging anything else?

 -daniel

 - Original Message -
 From: Wilfried Mestdagh wilfr...@mestdagh.biz
 To: ICS support mailing twsocket@elists.org
 Sent: Friday, November 20, 2009 12:55 PM
 Subject: Re: [twsocket] OverbyteIcsPingTst


 Hello Signed,

 Can you ping your local machine (127.0.0.1)?
 Can you ping both with the command interpreter?

 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz

 Thursday, November 19, 2009, 20:39, Signed Source(r) Project wrote:

  Hi guys,
  I have just tested -- OverbyteIcsPingTst which is
 delivered with v7 and
  noticed,
  It does not ping anything!!

  Here is what I get...
 
 ::
 :::
  Resolving host 'www.google.com'
  Host 'www.google.com

Re: [twsocket] Problem on connection successful / unsuccessful handling

2009-11-19 Thread Wilfried Mestdagh
Hello Andrea,

You should check in every event if there is a Winsock error. When nobody
is listening then OnSessionConnected is fired with winsock error 10061.
Then you know there is no connection. That is how winsock works.

Use the OnChangeState only for displaying options if you need it.

If you write a client the OnSessionConnected, OnSessionClosed (with
Winsock error checking) is importand.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Thursday, November 19, 2009, 15:20, Andrea Mennini wrote:

 Hi,

 I have a problem with connection successful / unsuccessful handling.

 TWsocket is version 5.5.

 I use it to send some commands to a remote, without any ACK, I.e. I open
 the connection, when the connection is on I write and so on.

 Everything works when the remote exists.

 If I try to connect to a non existent IP, that I'm sure it does not 
 exist, what I have is that the program waits and then after a while an
 OnChange event is fired and the state I have in wsConnected. Then, an 
 OnConnect event is fired.

 This is quite strange: why does it say connected while nobody connects
 to it?

 Is there any way for instance in the OnConnect to undestand whether it
 is really connected or not?

 How can I correctly handle this situation?

 Thanks

 Ciao

--
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] Simple POP3 application

2009-11-16 Thread Wilfried Mestdagh
Hello Michael,

Can you point me to the example and what exacly is going wrong? I like
to help you.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Monday, November 16, 2009, 15:26, Kochendoerfer, Michael wrote:

 I'd like to stay with ICS, as Indy gave me too many problems in the past...

 However - I found an old sample ('a mini pop3cli' - thanks to
 Wilfried :)), but this won't work. It enters state STAT, but when
 entering RETR, it gives an POP3 error 500 (RqType is 7), and I don't
 know where it comes from...

 In general, this little program is exactly doing what I'd like to do, and 
 it's expandable.

 Michael

 -Original Message-
 From: twsocket-boun...@elists.org
 [mailto:twsocket-boun...@elists.org] On Behalf Of Fastream Technologies
 Sent: Monday, November 16, 2009 2:49 PM
 To: ICS support mailing
 Subject: Re: [twsocket] Simple POP3 application

 I presume Francois will get angry when he reads your suggestion of a
 competitor on ICS list.

 SZ

 On Mon, Nov 16, 2009 at 3:42 PM, Alex Greenspan dig...@gmail.com wrote:

 You can use the indy POP3 component. I've used it in Delphi 7 and it's
 fairly simple.

 -Alex Greenspan

 On Mon, Nov 16, 2009 at 8:24 AM, Kochendoerfer, Michael m...@hem.de wrote:

  Hi,
 
  I'm curious if there's a very simple way to retrieve mails from a POP3
  account for writing them out to files. The MailRcv1 demo is too much for
  this (to handle and to understand), so I'm just looking for a very simple
  example on how to do it.
 
  Should be not much more than open/list
  (?)/retrieve-to-stream-or-file/close.
 
  We're on D7 and ICS V6 (?).
 
  TIA,
  Michael
 
 
  Legal Notice:
 
  HEM Vertriebs GmbH
  Haller Strasse 30
  D-74523 Schwaebisch Hall
  Fon: +49-791-4079-0
  Fax: +49-791-4079-80
 
  http://www.hem.de   email: i...@hem.de
 
  Rechtsform : HEM Vertriebs GmbH
  Handelsregister : Stuttgart HRB 570346
  Steuernummer: 84060/00397 UST-ID DE256870483
  Sitz der Gesellschaft : Schwäbisch Hall
  Geschaeftsfuehrer: Gunter Schaaf, Rene Schaaf
 
 
  --
  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
 



 --
 Alex Greenspan
 Digital Matrix Corporation
 92 Madison Ave.
 Hemsptead, NY 11550
 USA

 tel. +1.516.481.7990
 --
 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


 Legal Notice: 

 HEM Vertriebs GmbH
 Haller Strasse 30
 D-74523 Schwaebisch Hall
 Fon: +49-791-4079-0
 Fax: +49-791-4079-80 

 http://www.hem.de   email: i...@hem.de

 Rechtsform : HEM Vertriebs GmbH
 Handelsregister : Stuttgart HRB 570346
 Steuernummer: 84060/00397 UST-ID DE256870483
 Sitz der Gesellschaft : Schwäbisch Hall
 Geschaeftsfuehrer: Gunter Schaaf, Rene Schaaf

 --
 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] Simple POP3 application

2009-11-16 Thread Wilfried Mestdagh
Hello Michael,

I have received it and check as soon as I have a free moment. I post
copy on this list as it probably will benefit others.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Monday, November 16, 2009, 18:19, Michael Kochendoerfer wrote:

 Wilfried,

 thanks for your great support! I'd like to send you the example offline,
 as soon as I'll get access to my office pc.

 Michael

 Wilfried Mestdagh schrieb:
 Hello Michael,

 Can you point me to the example and what exacly is going wrong? I like
 to help you.

 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz

 Monday, November 16, 2009, 15:26, Kochendoerfer, Michael wrote:

   
 I'd like to stay with ICS, as Indy gave me too many problems in the past...
 

   
 However - I found an old sample ('a mini pop3cli' - thanks to
 Wilfried :)), but this won't work. It enters state STAT, but when
 entering RETR, it gives an POP3 error 500 (RqType is 7), and I don't
 know where it comes from...
 

   
 In general, this little program is exactly doing what I'd like to do, and 
 it's expandable.
 

   
 Michael
 

   
 -Original Message-
 From: twsocket-boun...@elists.org
 [mailto:twsocket-boun...@elists.org] On Behalf Of Fastream Technologies
 Sent: Monday, November 16, 2009 2:49 PM
 To: ICS support mailing
 Subject: Re: [twsocket] Simple POP3 application
 

   
 I presume Francois will get angry when he reads your suggestion of a
 competitor on ICS list.
 

   
 SZ
 

   
 On Mon, Nov 16, 2009 at 3:42 PM, Alex Greenspan dig...@gmail.com wrote:
 

   
 You can use the indy POP3 component. I've used it in Delphi 7 and it's
 fairly simple.

 -Alex Greenspan

 On Mon, Nov 16, 2009 at 8:24 AM, Kochendoerfer, Michael m...@hem.de 
 wrote:

   
 Hi,

 I'm curious if there's a very simple way to retrieve mails from a POP3
 account for writing them out to files. The MailRcv1 demo is too much for
 this (to handle and to understand), so I'm just looking for a very simple
 example on how to do it.

 Should be not much more than open/list
 (?)/retrieve-to-stream-or-file/close.

 We're on D7 and ICS V6 (?).

 TIA,
 Michael


 Legal Notice:

 HEM Vertriebs GmbH
 Haller Strasse 30
 D-74523 Schwaebisch Hall
 Fon: +49-791-4079-0
 Fax: +49-791-4079-80

 http://www.hem.de   email: i...@hem.de

 Rechtsform : HEM Vertriebs GmbH
 Handelsregister : Stuttgart HRB 570346
 Steuernummer: 84060/00397 UST-ID DE256870483
 Sitz der Gesellschaft : Schwäbisch Hall
 Geschaeftsfuehrer: Gunter Schaaf, Rene Schaaf


 --
 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

 

 --
 Alex Greenspan
 Digital Matrix Corporation
 92 Madison Ave.
 Hemsptead, NY 11550
 USA

 tel. +1.516.481.7990
 --
 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
 


   
 Legal Notice: 
 

   
 HEM Vertriebs GmbH
 Haller Strasse 30
 D-74523 Schwaebisch Hall
 Fon: +49-791-4079-0
 Fax: +49-791-4079-80 
 

   
 http://www.hem.de   email: i...@hem.de
 

   
 Rechtsform : HEM Vertriebs GmbH
 Handelsregister : Stuttgart HRB 570346
 Steuernummer: 84060/00397 UST-ID DE256870483
 Sitz der Gesellschaft : Schwäbisch Hall
 Geschaeftsfuehrer: Gunter Schaaf, Rene Schaaf
 

   
 --
 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



   

 --
 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] TSmtpCli autenication

2009-08-06 Thread Wilfried Mestdagh
 Mixed up request types with methods, guess you know what I mean
 nevertheless.

That's ok. Thanks for the help.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

--
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] TSmtpCli autenication

2009-08-05 Thread Wilfried Mestdagh
thank you Arno for fast answer,

Does it not matter how the code is written (OnRequestDone), eg like
this:

  case RqType of
 smtpConnect: begin
Cli.Helo;
 end;
 smtpHelo: begin
Cli.Mail;
 end;

Meaning, I don't use Ehlo method or so.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Wednesday, August 5, 2009, 17:31, Arno Garrels wrote:

 Hello Wilfried,

 I cannot test this at the moment, but if I set in TSmtpCli (ICS V5):
 AutType := smtpAuthAutoSelect;
 And fill in the userName and passWord (at creation time), is this
 enough that it find all possible autentication types (seems to be
 quit a few)? 

 It's enough. It even probes for types not announced in the EHLO response.
 It failed if no authentication was required.

 --
 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


Re: [twsocket] Sending Record Type Data over tcp

2009-06-30 Thread Wilfried Mestdagh
Hello Alper,

 I'm using LineMode, to receive all data sent. (My data size is 49b in total
 and no string data in it)
 Are there any conflicts i may encounter in the approach stated below?

Yes, if your binary data contains the line end characters you use the
your code will fail as Arno already mentioned.

Second, if you do not receive your whole data, but only a part of it
then your code will fail too. Also it is possible you receive your whole
packet and a part (or whole) of the next packet (depending on speed of
the transmitting prgram).

 (I intend to replace Rcvd variable with a global one to prevent having
 allocating it in every receive)

Good, allocating each time will slow down and possible to have
fragmented memory if you have hi speed transmission / reception. Not
need to use a global, but a class variable will do the same (but that's
probably what you mean).

 if RcvdSize  0 then exit;

You may better change this to:
  if RcvdSize = 0 then
 Exit;
Because if you receive nothing (0) then you can exit here also.
Somethime Winsock tell to receive and does not wants to give data (I
think Winsock is a women ;-)

 case Ord(Rcvd[0]) of // Choose data type
   0: begin
 New(Data);
 try
   CopyMemory(Data, @Rcvd[1], SizeOf(TStatus));

Yes oke, but what if you have just received one byte here? Then this
will fail.

You can use LineMode but then you have to make sure the line end
character(s) you want to use ar never in your data. Several approch ar
possible, Look at my article on 
http://wiki.overbyte.be/wiki/index.php/Sending_and_receiving_data
wich explain some of the possible approaches for binary data.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Tuesday, June 30, 2009, 18:29, Alper Albayrak wrote:

 Yes, Im using TCP.
 I solved my problem (at least in here) with replacing Move() into
 CopyMemory()

 I'm using LineMode, to receive all data sent. (My data size is 49b in total
 and no string data in it)
 Are there any conflicts i may encounter in the approach stated below?
 (I intend to replace Rcvd variable with a global one to prevent having
 allocating it in every receive)

 Thank you for help and kind replies..

 procedure TMainForm.WSocket1DataAvailable(Sender: TObject; ErrCode: Word);
 var
   Rcvd: PChar;
   RcvdSize: integer;
   Data: PStatus;
 begin
   if ErrCode  0 then exit;
   GetMem(Rcvd, 128);
   with (Sender as TWSocket) do
   try
 RcvdSize := Receive(Rcvd, 128);
 if RcvdSize  0 then exit;

 case Ord(Rcvd[0]) of // Choose data type
   0: begin
 New(Data);
 try
   CopyMemory(Data, @Rcvd[1], SizeOf(TStatus));
   ...
 except
   Dispose(Data);
 end;
   end;

   1: begin
   ...
   end;
 end;
   finally
 FreeMem(Rcvd);
   end;
 end;
 --
 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] Clients dysfunction

2009-06-23 Thread Wilfried Mestdagh
Hello Engi,

How do you send your data in the server?
it should be something like:

for n := 0 to Srv.ClientCount - 1 do
   try
  Srv.Clients[n].SendStr('Hello again');
   except
   end;

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Tuesday, June 23, 2009, 14:39, Engi wrote:

 Hi,

 I'm using 1 server and 3 clients.
 When server sends data to clients, only 1 client receive this data.
 In the server loop, the clientcount property is 3.

 I think there is a problem but I don't found it.
 Any help or advices would be appreciated.

 Engi
 --
 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] connection limit?

2009-06-17 Thread Wilfried Mestdagh
Hello Flavio,

Not a known issue. But when it accept new connections after you restart
your application, maybe you are out of nonpaged memory? (sockets use
nonpaged).

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Monday, June 15, 2009, 22:08, Flavio Goncalves wrote:

 I have an application dealing with GPRS connections, and there is a lot of
 connections/disconnections going all the time.
 The remote client connect to the server then send the authentication data.
 Sometimes there are bad connections and the remote client connects but the
 data never reach the server, and soon a timeout occurs and a new connection
 attempt is made.
 The server side have a timeout for incoming connections without
 authentication, and when it triggers a peer.close is called server side.
 After some time (4 or 5 days) the GPRS socket just stop accepting
 connections, but other sockets (on other ports) continue working.
 I did a function freeing the component and creating a new one with no
 success, that port dont accept new connections yet.
 Finally I close and then reopen the application, and everything is working
 again.
 Anyone have seen this before?
 Im using Delphi 7, and this app runs on Windows XP Professional.
 I wasnt using the latest ICS so im asking hoping this can be a know issue
 someone can answer now, but I already download the V5 one and will install
 it now.
 Thanks
 Flavio
 --
 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] TWSocket doesn't always send my data?

2009-05-27 Thread Wilfried Mestdagh
Hello Markus,

Since it happen sometimes it is possible you have some where an
exception that does not show up where you loose data.

Other possibility I see you have a long lineEnd. Can you also test with
1 or 2 character? Maybe you have an untested situation.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Tuesday, May 26, 2009, 22:21, Markus Humm wrote:

 Hello,

  after a little reseach and useage of that recommended trial version
  found out that the data really gets sent (OnDataSent also triggers).

 So we are now sure that the issue is probably located in the other
 application. The message is sent but that application doesn't see it.
 How do you know it has not been received ? I mean maybe it is received
 but
 actual processingis wrong.
 Are you able to debug that other application ?

 Since I'm the author of both applications I have full source code. What
 a benefit! ;-)

 Ok, the other application, in this scenario the server has a
 OnDataAvailable event where the first statement is a OutputDebugString
 command so I can see with Sysinternal's DbgView which messages are
 written and which not. In the good case the message can be seen in the
 bad one it's missing in the debug view so it didn't happen.

 What happens between WinSock and TWSocket? Where could it go lost? It
 hat the correct line end (#7, #8, #9, #0A #0D in my case).

 Any ideas?

 Greetings

 Markus
 --
 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] TWSocket doesn't always send my data?

2009-05-26 Thread Wilfried Mestdagh
Hello Markus,

 problem here is: it's a connection to 127.0.0.1 which at least Wireshark
 doesn't see. Can you recommend any other packet sniffer capable of
 watching localhost connections?

You can use SocketSpy (you can find it at the user made page). It works
like a kind of proxy dislaying all traffic trough it.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

--
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] OT: WM_USER or WM_APP

2009-05-04 Thread Wilfried Mestdagh
Hello Paul,

use starting from WM_USER.
You don't have to worry because you send / post messages to specific
windows, so the right window will receive it.

WM_USER = 0x400
WM_APP  = 0x8000

Windows help say:
Message numbers in the second range (WM_USER through 0x7FFF) can be
defined and used by an application to send messages within a private
window class.

Message numbers in the third range (0x8000 through 0xBFFF) are reserved
for future use by Windows.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Sunday, May 3, 2009, 21:46, Paul wrote:

 They start at WM_USER + 1.
 So there can be a conflict.
 I think I better switch to WM_APP then

 Paul

 - Original Message - 
 From: Arno Garrels arno.garr...@gmx.de
 To: ICS support mailing twsocket@elists.org
 Sent: Sunday, May 03, 2009 9:26 PM
 Subject: Re: [twsocket] OT: WM_USER or WM_APP


 Arno Garrels wrote:
 ID. You hopefully do not post/send common messages (not registered
 by AllocateMsgHandlers) to the ICS window in V6 and better.
 
 Sorry, when I said common, I meant custom message IDs, in the range
 ICS V6 and better might allocate for own purposes (search for 
 GWndHandlerMsgLow in OverbyteIcsWndControl.pas, there are comments). 
 It's no problem to post/send Windows messages such as WM_QUIT etc..
 
 --
 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


Re: [twsocket] TWsocket disconnect in 60 seconds

2009-05-01 Thread Wilfried Mestdagh
Hello Ronaldo,

At first sight I see nothing wrong with your code. However it is not
normal that some of the sockets close without reason. Wich of the
sockets do the close? Maybe the close is with a winsock error, then it
will tell you more about the reason. You have at least log all the
winsock errors in the different events.

Eventually you can also take a look at HpHttpProxy and SocketSpy, both
available at user made page of overbyte.be wich does more or less the
same as your application.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Thursday, April 30, 2009, 21:40, Ronaldo DeVinche wrote:

 Hello!
 i have made a proxy (sniffer) based on TWsockets from www.overbyte.be
 all works perfect... i capture packet and if need before send it back i
 modify it
 the problem is that proxy disconnect in +/- 1 minute

 is there is way how to increase or even disable thous disconnect timup`s or
 whatever it calls

 here is code
 ##

 type
 TForm3 = class(TForm)
 Socket: TWSocket;
 Server: TWSocketServer;
 Button1: TButton;
 CheckBox1: TCheckBox;
 Memo1: TMemo;
 Edit1: TEdit;
 Edit2: TEdit;
 Edit3: TEdit;
 Edit4: TEdit;
 Label1: TLabel;
 Label2: TLabel;
 Memo2: TMemo;
 Memo3: TMemo;
 Button2: TButton;
 procedure Button1Click(Sender: TObject);
 procedure FormCreate(Sender: TObject);
 procedure FormDestroy(Sender: TObject);
 procedure ServerClientConnect(Sender: TObject; Client: TWSocketClient;
 Error: Word);
 procedure ServerClientDisconnect(Sender: TObject; Client: TWSocketClient;
 Error: Word);
 procedure ServerDataAvailable(Sender: TObject; ErrCode: Word);
 procedure ServerError(Sender: TObject);
 procedure SocketDataAvailable(Sender: TObject; ErrCode: Word);
 procedure SocketSessionClosed(Sender: TObject; ErrCode: Word);
 procedure SocketSessionConnected(Sender: TObject; ErrCode: Word);
 procedure SocketSocksError(Sender: TObject; Error: Integer; Msg: string);
 procedure Button2Click(Sender: TObject);

 private
 ClientConnected: Boolean;
 ServerConnected: Boolean;
 TestLoop:Boolean;
 TestLoop2:Boolean;
 TestLoop3:Boolean;
 TestLoop4:Boolean;
 { Private declarations }
 public
 LocalClient: TWSocketClient;
 recvbuf, sendbuf: TWSocketData;
 { Public declarations }
 end;

 var
 Form3: TForm3;
 implementation

 {$R *.dfm}

 procedure TForm3.Button1Click(Sender: TObject);
 begin
 if Button1.Caption = 'Stop Proxy' then
 begin
 Server.Close;
 Socket.Close;
 Button1.Caption:='Start Proxy';
 end
 else
 if Button1.Caption = 'Start Proxy' then
 begin
 server.Addr:=Edit1.Text;
 server.port:=Edit2.Text;
 server.Listen;
 socket.addr:=Edit3.Text;
 socket.port:=Edit4.Text;
 Button1.Caption:='Stop Proxy';
 End;
 End;


 procedure TForm3.FormCreate(Sender: TObject);
 begin
 recvbuf:= AllocMem($);
 sendbuf:= AllocMem($);

 ClientConnected:= False;
 end;

 procedure TForm3.FormDestroy(Sender: TObject);
 begin
 FreeMem(recvbuf, $);
 FreeMem(sendbuf, $);
 socket.close;
 server.close;
 end;

 procedure TForm3.ServerClientConnect(Sender: TObject; Client:
 TWSocketClient;
 Error: Word);
 begin
 LocalClient:= Client;
 LocalClient.OnDataAvailable:= Server.onDataAvailable;
 if checkbox1.checked then
 Socket.Connect;
 memo1.lines.add('Client connected!');
 ServerConnected:= True;
 end;

 procedure TForm3.ServerClientDisconnect(Sender: TObject; Client:
 TWSocketClient;
 Error: Word);
 begin
 memo1.lines.add('Client disconnected!');
 ServerConnected:= False;

 if ClientConnected then
 socket.close;
 end;

 procedure TForm3.ServerDataAvailable(Sender: TObject; ErrCode: Word);
 var
 Len: Integer;
 begin

 Len:= LocalClient.Receive(sendbuf, $);
 memo2.lines.add( Format('Read from client %d bytes', [Len]) );

 if ClientConnected and (len0) then
 Socket.send(sendbuf, Len);

 end;

 procedure TForm3.ServerError(Sender: TObject);
 begin
 memo1.lines.add( Format('Error %d on server socket', [GetLastError]) );
 end;


 procedure TForm3.SocketDataAvailable(Sender: TObject; ErrCode: Word);
 var
 Len: Integer;
 begin
 Socket.FlushTimeout:=0;
 Len:= Socket.Receive(recvbuf, $);

 memo3.lines.add( Format('Proxy Read from server %d bytes', [Len]) );

if (len0) then
 LocalClient.send(recvbuf, Len);

 end;

 procedure TForm3.SocketSessionClosed(Sender: TObject; ErrCode: Word);
 begin
 memo1.lines.add('Proxy Disconnected from Server!');
 ClientConnected:= False;
 end;

 procedure TForm3.SocketSessionConnected(Sender: TObject; ErrCode: Word);
 begin
 ClientConnected:= True;
 memo1.lines.add('Proxy connected to Server');
 end;

 procedure TForm3.SocketSocksError(Sender: TObject; Error: Integer; Msg:
 string);
 begin
 memo1.lines.add('');
 end;
  end.
 ##


 Thank you!


 Ronaldo

-- 
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] TWsocket disconnect in 60 seconds

2009-05-01 Thread Wilfried Mestdagh
Hello Ronaldo,

As Arno already sayed this is not a winsock error. But to be sure
(because I don't see it in your code example), we are talking about the
ErrCode argument in the TWSocket events, right?

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Friday, May 1, 2009, 12:18, Ronaldo DeVinche wrote:

 i log all errors and only error i have is on SocketSessionClosed:
 *Error 5 on SocketSessionClosed*

-- 
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] TWsocket disconnect in 60 seconds

2009-05-01 Thread Wilfried Mestdagh
Hello Ronaldo,

 yes, error is on TWsocket!
 here is code

I don't see anywere in your code logging of the ErrCode argument in the
TWSocket events! So it is not sure where you get the error 5

I also see you use OnError event of TWSocketServer and use GetLastError
there. Don't use OnError, instead use your own exception blocks at the
places where you eventually expect an exception error.

I see you have a procedure ServerDataAvailable. Is this handler assigned
to the OnDataAvailable of TWSocketServer? If so this is wrong. The
serversocket will not receive data.

LocalClient is assigned in Server.OnClientConnect. That is good if you
use only 1 connection simultanously but if a second connection is
etablished you loose the original reference to it.

I already asked this, but again: witch socket does the close? And as
additional question, when does it close (when sending, receiving etc)?

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz


-- 
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] TWsocket disconnect in 60 seconds

2009-05-01 Thread Wilfried Mestdagh
Hello Ronaldo,

oke we are getting somewhere :)

 procedure TForm3.SocketSessionClosed(Sender: TObject; ErrCode: Word);
 begin   {this  is Socket = TWSocket}
 memo1.lines.add('Proxy Disconnected from Server!');
 memo1.lines.add( Format('Error %d on SocketSessionClosed', [GetLastError])

You dont' need to call the last error from windows. you have an ErrCode
argument. So pleas change this to:

 memo1.lines.add( Format('Error %d on SocketSessionClosed', [ErrCode])

also in al the other events is an ErrCode argument, so log this
everyware during development.

 only here i got error : Error 5 on SocketSessionClosed

As Arno already say: Sounds like the Windows system error code
ERROR_ACCESS_DENIED but this is probably somewhere in your code and
possible also the reason for a winsock failure.

 its closes on Socket.Receive
 in packet log i see: Proxy Read from server -1 bytes --this is
 socket.Receive (TWsocket)

Put a try / except block in the Receeive event. Possible you have an
exception over there and the reason for the close.

Also for the moment do the same in all events an also in all events log
the ErrorCode argument as in my example.

 sory for my poor English.

No probelm at all :)

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Friday, May 1, 2009, 16:20, Ronaldo DeVinche wrote:

 *I don't see anywere in your code logging of the ErrCode argument in the
 TWSocket events! So it is not sure where you get the error 5*

 procedure TForm3.SocketSessionClosed(Sender: TObject; ErrCode: Word);
 begin   {this  is Socket = TWSocket}
 memo1.lines.add('Proxy Disconnected from Server!');
 memo1.lines.add( Format('Error %d on SocketSessionClosed', [GetLastError])
 );
 ClientConnected:= False;
 end;

 only here i got error : Error 5 on SocketSessionClosed
 Only this socket closes.

 LocalClient (TWSocketClient) is still connected to server (TWServerSocket)

 *
 I see you have a procedure ServerDataAvailable. Is this handler assigned
 to the OnDataAvailable of TWSocketServer? If so this is wrong. The
 serversocket will not receive data.

 LocalClient is assigned in Server.OnClientConnect. That is good if you
 use only 1 connection simultanously but if a second connection is
 etablished you loose the original reference to it.*

 well.. i still only lierning delphi
 and this was only way that i can figure out to get all this work

 dont have an idea how to do this in other way..

 *I already asked this, but again: witch socket does the close? And as
 additional question, when does it close (when sending, receiving etc)?*

 Closes only Socket (TWsocket)
 LocalClient Socket (TWSocketClient) is still connected to Server
 (TWsocketServer)

 its closes on Socket.Receive
 in packet log i see: Proxy Read from server -1 bytes --this is
 socket.Receive (TWsocket)
 in error log i see: Error 5 on SocketSessionClosed  -this is socket
 (TWsocket)

 PS.
 sory for my poor English.

 PSS.
 Thanks for your time

-- 
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] TWsocket disconnect in 60 seconds

2009-05-01 Thread Wilfried Mestdagh
Hello Ronaldo,

10053 is when OS decide to stop the connection. Normally this is because
of some network problem, a malfunctioning router or switch. But many
virus scanners and firewalls are doing wierd things with TCP, so stop
any service of it (not disable it) and test again.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Friday, May 1, 2009, 18:07, Ronaldo DeVinche wrote:

 exceptions are without errors
 well i checked all events on TWserverSocket and TWsocket and errors ocurs
 only here:

 *procedure TForm3.SocketSessionClosed(Sender: TObject; ErrCode: Word);
 **  begin   {this  is Socket = TWSocket}
  memo1.lines.add( Format('Error %d on SocketSessionClosed', [ErrCode])

 code is *error 10053
 *seems **somthing**  is wrong in proxy (my code)  its skip some packets
 after proxy (socket (TWsocket)) is dissconneted
 socket closed

 i should look closer to my code and meybe even rebuild it

 Thank you!

 Ronalds




 *

-- 
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] TCP connection problem

2009-04-10 Thread Wilfried Mestdagh
Hello Markus,

 I haven't yet a failure message or so

if a socket can't connect then onsessionconnect is fired with an error
code. then onsessionclose is fired, eventually also with an error code.
I assume you keep these errorcodes in an errorlog file or so. you have
to give this so we can see wha'ts wrong.

disable also temporry firewall, virusscanners and other security
software because it can give many trouble.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Thursday, April 9, 2009, 18:48, Markus Humm wrote:

 Hello,

 I'm wrining a 2-part application where both parts use a TWSocket to
 communicate with each other.

 The one part is started and creates a listining socket on localhost's
 port 8999 where the other will connect to.

 Now on some PCs (Windows 2000 at least in one case) this fails. The user
 has only user rights and the server part starts listening but the
 client doesn't connect.

 I haven't yet a failure message or so as I can't debug there.
 If the user has admin rights it works I think (I'm currently only
 99% sure). Any hints what this could be?

 I'm still using ICS 5.x and Delphi 2007.

 Greetings

 Markus

-- 
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] AV trying to download from a website

2009-03-15 Thread Wilfried Mestdagh
Hello Jeff,

 I followed the example (I think!) and created the stream in DocBegin,
 used it RequestDone and freed it in DocEnd - which seems logical but in
 debugging I see that DocEnd comes before RequestDone.

DocBegin: fires at begin of the document
DocEnd: fire at end of the document
RequestDone: the component has done the request

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Friday, March 13, 2009, 22:18, Jeff Cook wrote:

 Thanks for that Piotr

 Indeed it is nil.  Obviously I done understand the order of firing of
 events.

 I followed the example (I think!) and created the stream in DocBegin,
 used it RequestDone and freed it in DocEnd - which seems logical but in
 debugging I see that DocEnd comes before RequestDone.

 Moving the freeing of the stream to RequestDone makes it work - but
 then why doesn't the example AV???

 -Original Message-
 From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
 On Behalf Of Piotr Da©øek
 Sent: Friday, 13 March 2009 10:51 a.m.
 To: ICS support mailing
 Subject: Re: [twsocket] AV trying to download from a website


 Probably you're freeing destination stream before using it. Put
 something like

 if HttpCli.RcvdStream=nil then
   ShowMessage('RcvdStream is NIL, click OK to crash.');

 before sl.LoadFromStream(HttpCli.RcvdStream); to check whether that's
 the case.

 -- 
 Piotr Da©©ek
 enigmati...@interia.pl

 --

 Zyskaj tak jak ja 9% na lokacie w pierwszym miesiacu! 
 Sprawdz! http://link.interia.pl/f207b


 -- 
 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] Freeing of sockets

2009-02-18 Thread Wilfried Mestdagh
Hello Markus,

Release post a message to a hidden window. when the message is received
Destroy is called. You can check that with the debugger.

Destroy call the destructor direct. Free checks for null value and then
calls Destroy.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Wednesday, February 18, 2009, 09:47, Markus Mueller wrote:

 This also don't work. I never see my (extended) destructor beeing called,
 if it is called Free nor Destroy. Also my memory usage is increasing
 if I just do release. If I do Free I get memory errors but the memory
 usage is not increasing.

 Please, how is the realy right way to free the TWSocket objects ? It seems
 that Release doesn't do anything...

 Much regards,
 Markus Müller
 Destructor must be called Destroy, not Free

 Markus Mueller wrote:
   
 Hi Wilfried,

 I have created an destructor Free, which inherited runs Free of 
 TWSocket. This
 Free is never called; can anybody tell me why?

 Are you realy sure it is freed by calling Release if it is never calling
 Free?!

 Regards,
 Markus Mueller
   
 
 Hello Markus,

 you have to destroy it outside an event handler. to do that you can call
 the Release method. Then it is destroyed when messages are pumped again,
 so after your code finish.

 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz

 Tuesday, February 17, 2009, 10:40, Markus Müller wrote:

   
 
   
 Hello Mailinglist,
 
   
 
   
 
   
 my project is now just working great, thanks very much for your
 help... but there is just one question. Cause it only works fine
 if I don't free TWSocket objects. If I Free them it often works
 fine. But in much cases - for example - in the OnSessionClose
 Handler (the memory of the handler is provided by an other Object
 not beeing freed) then I get strange behaviors. Sometimes it gives
 memory errors on InternalClose functions, sometimes the application
 just freezes completely (strange cause all TWSocket is in an own
 thread) and Delphi crashes the hard way...
 
   
 
   
 
   
 If I do Abort on an TWSocket, then the following lines are not
 running... It seems that it calls exit withing the function? So my
 Free is never reached. In this case I have completly no idear
 how to Free such a socket
 
   
 
   
 
   
 So my question is: How can I free a TWSocket object after the
 connection has been closed, aborted or the handler reports that
 the session has been closed.
 
   
 
   
 
   
 Thanks for hints,
 Much regards,
 Markus Mueller
 
   
 
   
 
   
   
 

   


-- 
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] Freeing of sockets

2009-02-17 Thread Wilfried Mestdagh
Hello Markus,

you have to destroy it outside an event handler. to do that you can call
the Release method. Then it is destroyed when messages are pumped again,
so after your code finish.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Tuesday, February 17, 2009, 10:40, Markus Müller wrote:

 Hello Mailinglist,

 my project is now just working great, thanks very much for your
 help... but there is just one question. Cause it only works fine
 if I don't free TWSocket objects. If I Free them it often works
 fine. But in much cases - for example - in the OnSessionClose
 Handler (the memory of the handler is provided by an other Object
 not beeing freed) then I get strange behaviors. Sometimes it gives
 memory errors on InternalClose functions, sometimes the application
 just freezes completely (strange cause all TWSocket is in an own
 thread) and Delphi crashes the hard way...

 If I do Abort on an TWSocket, then the following lines are not
 running... It seems that it calls exit withing the function? So my
 Free is never reached. In this case I have completly no idear
 how to Free such a socket

 So my question is: How can I free a TWSocket object after the
 connection has been closed, aborted or the handler reports that
 the session has been closed.

 Thanks for hints,
 Much regards,
 Markus Mueller


-- 
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] breakpoint in NTDll

2009-02-09 Thread Wilfried Mestdagh
Hello Arno,

 procedure PatchINT3;

This procedure works great. But something is strange. If I run this in a
separate application then it does not work. However as far as I know a
DLL is loaded only once in memory. So then it should work also if I run
this in a separate app and let the other applicaiton run like this:

eg a console app:
begin
  PatchInt3;
  ReadLn();
end.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
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] HttpCli Err 10053

2009-01-27 Thread Wilfried Mestdagh
Hello Paul,

You could do very small delays by posting a message to a custom message
handler. You cannot measure the delay, but it is not depending the
timeslice like with the other delay's or a TTimer.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Monday, January 26, 2009, 21:43, Paul wrote:

 When I have a very fast connection to an application server, I sometimes get
 a 10053 errorcode.
 (software caused a connection abort)
 Sofar, I was unable to trace it (it doesn't happen during trace)
 Since all commands are at most 30 characters, bandwidth control wouldn't
 help at all to slow the speed..
 I want to implement a 2 ms delay between each command on a very high 
 connection speed.
 To measure the speed, I will measure the time between start en end of the
 transfer (queryperformance timer)
 If it's too high, I want a 2 ms delay, but none of the available delays
 (sleep(ex), WaitForSingleObject(ex) ot waitFoeMultibleObjects(ex) wotk
 reliable for such a small delay.
 It's either 0 of 15/16 ms, the latter is most likely the time slice delay.
 Has anyone ever found a proper solution for this ?

 regards,

 Paul


-- 
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] HttpCli Err 10053

2009-01-27 Thread Wilfried Mestdagh
Hello Paul,

 I think tou mean sending a message here to block the program flow a while.

Not exacly. If you use SendMessage to a message pump for a window
created in the same thread contextt then it is just a function call. If
other thread context then it will block until the thread has timeslice.

But if you use PostMessage to same thread context. and IN your custom
message handler you do your next operation, then you have a very small
delay without hanging up the message pump for this thread.

If you want to block the program flow then you can also use a close
loop. But no message will be processed in the same thread context during
the loop and I don't think that was what you wanted.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Tuesday, January 27, 2009, 12:56, Paul wrote:

 Hi Wilfried,

 You could do very small delays by posting a message to a custom message
 handler. You cannot measure the delay, but it is not depending the
 timeslice like with the other delay's or a TTimer.

 I think tou mean sending a message here to block the program flow a while.

 I use a queue with all instructions that have to be sent to the server.
 The HttpCli runs in async mode and when a instruction has been sent, it
 posts a message to check the queue from there, the next instruction will be
 sent.
 I can check the speed of the connection as the time between start and end of
 the transfer with QueryPerformanceCounter.
 All instructions to send are pretty similar, so the the connection speed can
 be estimated this way.
 I have no problem with the timeslice, but with the 2ms delay.
 If I use the delay methods I listed before, the delay is always 0 or 15 ms.
 The 15 ms is just the timeslice, so the delay isn't working at all with such
 short periods.
 As I replied to Angus, including a software delay (checking the 
 QueryPerformanceCounter) increases the cpu load a lot.

 Paul 


-- 
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] HttpCli Err 10053

2009-01-27 Thread Wilfried Mestdagh
Hello Paul,

What about the assembler pause opcode? I think it is introduced starting
pentium 4. You could do the delay loop in asm and insert pause's to
decrease the cpu load.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Tuesday, January 27, 2009, 13:41, Paul wrote:

 Hi Wilfried ,


 But if you use PostMessage to same thread context. and IN your custom
 message handler you do your next operation, then you have a very small
 delay without hanging up the message pump for this thread.

 This is a delay of max a few microseconds and it is working this way 
 already.
 Windows is very fast with messages: it can handle about 500.000/s on recent
 PC's


 If you want to block the program flow then you can also use a close
 loop. But no message will be processed in the same thread context during
 the loop and I don't think that was what you wanted.

 This is what I want when the connection speed is too high.
 The only problem is that a software loop increases to cpu load to 40 %.
 It wouldn't be a problem if only a few messages are sent, but it is with a
 continuous stream of very short messages.

 It would be great to have a non-cpu-extensive delay for very periods.
 That way, a better bandwidth control could be implemented in ICS also.
 The current one has been useles so far (for me) because the current timing
 period is at least 1000 times too high for me

 Paul


-- 
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] breakpoint in NTDll

2009-01-22 Thread Wilfried Mestdagh
Hello Arno,

This is interesting. If I see it clear you change the int 3 with a nop
instruction.

The only strange thing is, that I never had that problem (win xp sp3,
D7), but it could be by a recent upgrade service pack maibe...

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Thursday, January 22, 2009, 13:13, Arno Garrels wrote:

 Hoby Smith wrote:

 Anyway, if that is the case, there is nothing you can do but just
 live with it or upgrade the OS.  :)

 Actually you can, see OverbyteIcsNtlmSsp.pas:

 { Get rid of some ntdll.DbgBreakPoints M$ forgot to remove from their DLLs  }
 { popping up the CPU window. Written by Francois Piette, published 2002 in  }
 { HowToDoThings website, based on code written by Pete Morris. 
 { Tiny change by myself - to be very correct ;-)   
 procedure PatchINT3;
 var
 NOP  : Byte;
 NTDLL: THandle;
 BytesWritten : DWORD;
 Address  : Pointer;
 begin
 if Win32Platform  VER_PLATFORM_WIN32_NT then Exit;
 NTDLL := GetModuleHandle('NTDLL.DLL');
 if NTDLL = 0 then Exit;
 Address := GetProcAddress(NTDLL, 'DbgBreakPoint');
 if Address = nil then Exit;
 try
 if Byte(Address^)  $CC then Exit;
 NOP := $90;
 if WriteProcessMemory(GetCurrentProcess, Address, @NOP, 1, 
 BytesWritten) and
   (BytesWritten = 1) then
 FlushInstructionCache(GetCurrentProcess, Address, 1);
 except
 //Do not panic if you see an EAccessViolation here, it is perfectly 
 harmless!
 on EAccessViolation do ;
 else
 raise;
 end;
 end;

 initialization
 if DebugHook  0 then
 PatchINT3;

-- 
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] breakpoint in NTDll

2009-01-21 Thread Wilfried Mestdagh
Hello,

I run a certain application using TWSocket, and when I run it in the
debugger, then every time when a re Connect is happening (if no server
available) the debugger stops at a hardcoded break:

 NTdll.DBGBreakPoint
int 3
ret

any idea how this can happen ?

--
Rgds, Wilfried
http://www.mestdagh.biz

-- 
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] ICS application with TrayIcon

2009-01-18 Thread Wilfried Mestdagh
Hello Paul,

No this is not needed in a tray icon because it can use the notification
from windows. You find one on my site.

Of course when you popup a menu if click on it then it processes
messages but this is NOT from within an event from an ICS component so
no harm.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Sunday, January 18, 2009, 11:27, Paul wrote:

 Every TrayIcon I know (including Delphi's) uses Application.ProcesMessages
 somwhere.
 Anyone have had troubles with it in an ICS application?

 Paul 


-- 
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] Mailing list usage

2008-12-17 Thread Wilfried Mestdagh
a time ago I found a free service to message board that could be act as
a copy of a mailing list and vice versa. then both can be used.

if Francois agree I could search for it.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Wednesday, December 17, 2008, 10:31, Anton Sviridov wrote:

 Of course it's just my imho, but wouldn't it better to switch to
 modern technologies like message boards/forums? Nailing list...
 forgive me, but it's an ancient ages stuff. Main inconvenience is a
 huge quotations in each mail, and the further in discussion, the
 larger they grow, sometimes including 3 or 4 mails! So the digest
 becomes terrifying, and hard to read new info.
 Another trouble is answering - as for me, I only receive digest, so
 I couldn't just press Reply, I am compelled to copy-paste each
 sentence and it is really tiring work.

 --
 Best regards, Anton

-- 
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] Multiple OnDataAvailable calls when no data to read

2008-11-26 Thread Wilfried Mestdagh
Hello Anton,

 *embarrassed* how these two statements combine?
 Why several Receives should cause troubles?

it is by design, only 1 receive call in the event.

 And another question. Is TWSocket.RcvdCount value reliable, i.e. if
 it = 0, then there is really no data in the socket?

Microsoft reports that the RcvdCount is not always reliable. Even if
null then beste is to try to receive. See4 ReceiveStr as excmple.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
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] Multiple OnDataAvailable calls when no data to read

2008-11-25 Thread Wilfried Mestdagh
Hello Anton,

Don't worry. You don't have to do anything on the 'would block' winsock
error. TWSocket deals with it.

when OnDataAvailable fires, just try to receive all data. When Receive
return 0 or -1 then just exit the event handler.

-1 is error (don't worry), and 0 is if the peer has closed.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Tuesday, November 25, 2008, 15:29, Anton Sviridov wrote:

 I'm now implementing a server on the base of TWSocketServer. In the
 client app I send some message to the server app, which receives it
 inside ServerIn_ClientDataAvailable procedure. Receiving is realized
 step by step to find a signature of message - i.e., there are several
 client.Receive in the method.
 I faced with strange thing: after whole message is read (and no
 data is sent yet), client's OnDataAvailable is executed some more
 times. TMsgReceiveSocket(Sender).RcvdCount returns 0, and Receive
 returns -1 with error code Would block. So the question: why
 OnDataAvailable is executed when there is actually no data to be read?

 --
 Best regards, Anton

-- 
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] UDP Address

2008-10-16 Thread Wilfried Mestdagh
Hello Martin,

Here is a small example:

procedure TFoo.FUDPDataAvailable(Sender: TObject; Error: word);
var
   Buffer: array [0..1023] of char;
   Len: integer;
   Src: TSockAddrIn;
   SrcLen: integer;
begin
   SrcLen := SizeOf(Src);
   Len  := TWSocket(Sender).ReceiveFrom(@Buffer, SizeOf(Buffer), Src, SrcLen);
   if Len  0 then
  Exit;
   Buffer[Len] := #0;

   {$ifdef DEBUG}
  WriteLn('UDP packet received from ', inet_ntoa(Src.sin_addr));
  WriteLn('Data ', Buffer);

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Friday, October 17, 2008, 04:47, Xealot wrote:

 Hello!

 I would like to know if its possible to get the address that a UDP packet
 comes from.

 I am making an application that will send multiple packets to different
 hosts using SendTo and I will be receiving replies from them.

 I have no power to change the protocol, so I need to know if its possible to
 find out the address each packet arrived from.

 Currently, I use bytesread := sock.Receive(@data, SizeOf(data));  to receive
 the data.

 where sock is a TWSocket object.  sock.Addr will not work here.. :(

 Thanks for taking your time,

  - Martin E.

-- 
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] gphttpproxy component problem

2008-07-03 Thread Wilfried Mestdagh
Hello ibrahim,

 Some pictures are not showing

When the server close then the local connection is closed also. Probably
all data is not transmitted to the client at this moment. Try to find
this place in the code and replace Close or CloseDelayed with
Shutdown(1). That's probably the reason.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Thursday, July 3, 2008, 18:06, ibrahim bulut wrote:

 

 Hi folks.

 

 I am writing an application with gphttpproxy component.

 I set proxy for internet explorer and sniffing the traffic.

 

 But i have a problem about proxy. If gphttpproxy component is active, users
 internet explorer is not working correctly.

 Some pictures are not showing and explorer does not navigate correctly.
 Sometimes, when i want to navigate www.yahoo.com http://www.yahoo.com/
 but explorer navigate me another web page. I must try a few times for
 correct results. Some sites is not opening.

 

 If i stop the gphttpproxy component, everything works fine.

 

 What is the problem.

 

 thanks


-- 
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] Socket throughput optimizations

2008-06-11 Thread Wilfried Mestdagh
Hello Tobias,

 In order to messure transmission speed I would write a small
 test suite including client and server. The client would send
 preallocated, constant data blocks in a loop and would use event
 OnDataSent to send the next block. The server would simply through
 away anything. 

You find something like this on my site.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
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] ICS functions blocked when UI is active

2008-06-04 Thread Wilfried Mestdagh
Hello John,

Normally this is no problem. I think with dropdown menu open there is no
problem also, because windows is pumping messages when a menu is open.

But depending on your applicaiton you can do the socket thing in a
separate thread. Other possibility is to run the communication in a
NT service and have the user interface (separate application) talk to
the service with eg a named pipe (or another tcp connection).

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Wednesday, June 4, 2008, 00:48, John D Algeo wrote:

 I have observed that Windows does not pass messages to an
 application when certain User Interface functions are active. 
 Examples are an open drop-down menu or a user dragging a window.  This
 can cause ICS functions such as this Socket Open code to fail:

{ Use while to repeat connects to ensure enough time for reset to end }
 tTarget := Time + ((FiResetTime / 1000.0) / 86400.0);
 while not FfConnected and (Time  tTarget) do begin
   FiLastError := SocketConnect; { Sets FfConnecting }
   if FiLastError = FX_OK then
   begin
 { FfConnecting is cleared by FWSocketSessionConnected, may happen on
   socket connection timeout }
 while FfConnecting do
   Application.ProcessMessages;{ This can be FWSocket.MessagePump; 
 }
   end; {if FiLastError=FX_OK}
 end; {while not connected}

 With a drop-down menu open, this will run as for long as
 FiResetTime is set ( 30 seconds) without connecting.

 Is there a way to make Windows continue to pass messages even if a
 drop-down menu or other UI function is active?

 Thanks,
 John

-- 
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] TWSocket.Send timing

2008-05-15 Thread Wilfried Mestdagh
Hello Andy,

 Dan was correct. The time I noted was for Send to return, not for the data to
 actually be sent.

Sorry then I have given you a wrong answer.

 Given the 300ms for Send to return, is this to be expected?

No it should return immediatly, the function is async. Are you
absolutely sure of this? Do you have a recent version of ICS?

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Thursday, May 15, 2008, 09:09, info2004 wrote:

 Wilfried,

 Dan was correct. The time I noted was for Send to return, not for the data to
 actually be sent.

 Given the 300ms for Send to return, is this to be expected?

 If it is, then I will look to optimise elsewhere. But it just seems likely 
 that
 something is a miss - wrong option setting maybe.

 Regards,

 Andy
 Wilfried Mestdagh wrote:
 Hello Dan,
 
 As far as I know it shouldn't cause the TWSocket send call to take
 longer since that is asynchronous
 
 Correct, but I think he means the total time to send, not the time of
 the function call.
 
 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz
 


-- 
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] TWSocket.Send timing

2008-05-15 Thread Wilfried Mestdagh
 My debug function to log the timestamps was the culprit.

oke then all is fine :)

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
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] TWSocket.Send timing

2008-05-14 Thread Wilfried Mestdagh
Hello Dan,

 As far as I know it shouldn't cause the TWSocket send call to take
 longer since that is asynchronous

Correct, but I think he means the total time to send, not the time of
the function call.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
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


  1   2   3   4   5   6   >