Re: [twsocket] MagFTP Upload Speed

2013-05-07 Thread Angus Robertson - Magenta Systems Ltd
 Also informing you that as far as Excludes are concerned the option 
 you have given suits me well 

I realised it would help me as well. When I synchronise my local web
sites with my public server using delete old files, the ICS SVN files all
disappear since they are generated by scripts on the server, so I need to
exclude that directory. 

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


Re: [twsocket] Close connection (destroy) idle clients

2013-05-07 Thread Angus Robertson - Magenta Systems Ltd
 Hello, I could use the component TWSocketServer based on this 
 example: http://edn.embarcadero.com/br/article/20465
 now it seems to be working perfectly connecting to POS terminals

That article was written by Francois, so I'm sure it's fine.  I doubt
it's any different to the existing ICS demos. 

 when the connection is terminated the client side, or 
 simply strip the cable network, the server is terminated after some
 time (timeout)?

If the remote client properly disconnects, the server client should drop.


If the connection drops unexpectedly when no traffic is being sent, there
will be no disconnection so you need to implement a timeout.  Look at the
ICS FTP server which does exactly that.  

Basically you use GetTickCount to set a variable to indicate when each
client connects and when data is sent or received, then have a single
global timer firing every five seconds which checks each client in turn
and disconnects any that last had activity two minutes ago or whatever
you need.  Don't use a timer per client. 

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


Re: [twsocket] MagFTP Upload Speed

2013-05-06 Thread Angus Robertson - Magenta Systems Ltd
 1) In case I have to upload some data (eg: 5GB). How can I get to 
 know approximately how much time it will take ?

Use CopyEvent, LogLevelProg gives you an ASCII string every couple of
seconds showing how much has been transferred and the total size.
Unfortunately from your perspective, the response is friendly format, ie
4.5Mbyte of 2.6Gbyte, which you'd need to parse with the time taken so
far to estimate the time left.  The internal variables are not available
in the event.  The component does report the time and speed at the end,
but that does not really help you. 

To do it properly really needs a new LogLevelSpeed type in the procedure
onFtpClientProg64 that does all these calculations and gives an ASCII
response.  I'll put it on the wish list, with exclude sub-directories.   
 
 2) Just wanted to know if there are any size limits for upload with
 ICS/MagFtp ?

No real limits, I've tested file transfers of DVD size, but nothing
larger.  But MagFtp only uses a single socket at a time.  If you want
more efficient uploading of single large files you would be better
looking at OverbyteIcsMultipartFtpDownloader (no uploader) that splits a
large file into chunks and does multiple parallel transfers. 

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


Re: [twsocket] Close connection (destroy) idle clients

2013-05-02 Thread Angus Robertson - Magenta Systems Ltd
 Hello, the protocol used is TCP,

TCP/IP is a transmission mechanism, not a protocol, those are commonly
named HTTP, FTP, SMTP, etc. 

 the POS terminal sends to the server is a
 string of ASCII characters like this
 ACTION=VENDAID_TERMINAL=528-533-378ID_EVENTO=1579ID_SETOR=00
 018087QTDE=01TPEMISSAO=0TIPO=0MAG=0

The text may be ASCII, but there are no line endings so it's not a line
oriented protocol, it's more like an HTTP POST response.  

 what happens is that after some transactions by sending the string
 to the server, the event OnDataAvailable is no longer triggered,

Using linemode false or true?  Are you expecting more data?  
 
 this happens only with the component TWSocketServer, since the
 component TWSocket this problem  never happens 

TWSocketServer uses TWSocket, no difference.  So the difference must be
between the ways you have implemented the code.   

 I also did the test with TMagIpLog and the same problem
 happens 

Sorry, can not explain that. Except TMagIpLog is heavily used in my own
applications and never loses data.  

I would refer back to my previous comment about creating a test
application, you can use TMagIpLog in client mode, to send similar data,
being able to see the responses your server sends may give a clue as to
why everything stops. 

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


Re: [twsocket] Close connection (destroy) idle clients

2013-05-01 Thread Angus Robertson - Magenta Systems Ltd
 Could use ThrdServer example, the problem was solved with
 WSocketServer1.Banner: =''; now I can not receive data, by 
 setting longer just LINEMODE = FALSE, and after a few connections,
 does not enter the event OnDataAvailable when LINEMODE = TRUE event 
 OnDataAvailable is never triggered 

OnDataAvailable is identical in all ICS components, does not matter which
client or server demos you look at.  

You have not told us what protocol your POS terminals are using,
specifically whether it is ASCII line oriented or binary packets, and
LINEMODE=TRUE will only work with the former.  

In practice, I rarely use LINEMODE=true even for line oriented protocols,
because sometimes those lines may be thousands of characters long and
exceed the buffers.  I usually use Receive or ReceiveFrom to accept data
into a buffer, and then loop through the buffer character by character
checking for line endings and other control characters and writing a
simple string for further processing.  The loop can check for long lines
and have a timeout if data stops half way through a line. 

For an example look at procedure TMagIpLog.SocketDataAvailable in the
component I recommended you use for testing yesterday, you are simply
trying to reinvent stuff that others have done already. 

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



Re: [twsocket] Close connection (destroy) idle clients

2013-04-30 Thread Angus Robertson - Magenta Systems Ltd
 I could not use the component and WSocketServer WSocketThrdServer 
 not know how to use the event OnDataAvailable examples that have

The SocketServer demo is OverbyteIcsTcpSrv.dpr, ThreadServer is
OverbyteIcsThrdSrvV3.dpr. 

You can also try TMagIpLog from:

http://www.magsys.co.uk/delphi/magics.asp

which is a combined client and server component designed for simple
telnet protocols, there is an EXE can you run to listen on your port and
it will display anything that arrives. 

All these demos illustrate the event OnDataAvailable 

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


Re: [twsocket] Close connection (destroy) idle clients

2013-04-30 Thread Angus Robertson - Magenta Systems Ltd
 Hello, I am using the example OverbyteIcsThrdSrvV3.dpr plus what 
 happens is that the wind ClientDisconnect is called before
 processing the received data, and so the connection is lost 

I assume you have turned off the default banner that the server component
sends upon answer (set Banner:='';), that will upset clients expecting a
specific response. 

Have you tried the TMagIpLog demo?   It is very simple, and very reliable.


You can also try using a simple client OverbyteIcsCliDemo.dpr to connect
to your server so you can see exactly what happens on connect.  When
writing server protocols, it's often useful to have a test client
application to methodically test the commands you implement, with false
or corrupted data for instance, which is hard to test with your 'real'
client.  

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


Re: [twsocket] ICS of delphi DX3 can not redirection is disabled

2013-04-26 Thread Angus Robertson - Magenta Systems Ltd
 Where to get the ICS frame browser demo code? thanks.

It is part of the ICS V7 and V8 distributions, in directory:

.\Samples\delphi\BroswerDemo  

It is a full visual browser, using the THtmlViewer component from:

http://code.google.com/p/thtmlviewer/

so displays most web pages, although without any scripting.  It has a
diagnostic window that displays both headers and data downloaded, which
can be very useful to see how a web page is built.  

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


Re: [twsocket] Close connection (destroy) idle clients

2013-04-26 Thread Angus Robertson - Magenta Systems Ltd
 Hello guys, I'm using the component connections TWSocket for various
 customers making and receiving requests, in some cases the client 
 loses the connection to the server,

TCP not necessarily know a connection is lost since there may be no
packets sent for many hours.  You normally implement inactivity timeouts
to disconnect clients that don't respond.  

If you used the Socket Server as I suggested yesterday, much of this is
automatic.  You don't normally need to use threads in an ICS application,
unless you are making long blocking calls, 500 clients without threads is
common.  

You check SocketState property to see if a connection is closed. 

 if ClientThread.ClientWSocket.OnSessionClosed then

No idea what you are attempting to do here, this is an event handler
setter, not a property. 

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


Re: [twsocket] XE4 install fails

2013-04-26 Thread Angus Robertson - Magenta Systems Ltd
 I just installed RAD Studio XE4 into a brand new VM (WIN64)
 After that I tried to install ICS V8 (downloaded about an hour ago).
 I opened Dxe4InstallVclFmx.groupproj and then tried to compile 
 IcsVclDXE4Run but got a fatal error 

Arno only started testing ICS with XE4 last night, no-one else has had
time to test his changes yet, I only installed XE4 yesterday and won't
have time to use it until mid next week.  Please be patient, but keep an
eye on SVN (and the nightly V8 zips) for the next few days. 

You might find the packages without FireMonkey support better, since
there were far fewer Win32 changes in XE4.  

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


Re: [twsocket] Close connection (destroy) idle clients

2013-04-26 Thread Angus Robertson - Magenta Systems Ltd
 I am not able to use the component TWSocketServer with POS 
 terminals (do
 not have access to sources of client developed in C), the error 
 occurs  after the connection OverbyteIcsWSocketS

What error?  


 I need to do is receive multiple simultaneous connections to these
 terminals make query on a sql server database and returns the 
 contents

You can not use threads with SocketServer client responses, although you
can use a thread to prepare a response and send it from the main thread,
look at the FTP server which uses threads to index directories and
calculate MD5 hashes, but still uses SocketServer. 

My ICS web server is driven by a SQL database, but most queries takes 20
to 100ms so I did not bother to use threads, effectively the server stops
for that moment, but still supports 100 or more active sessions. 

If you really need client threads, you should be using TWSocketThrdServer.


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


Re: [twsocket] ICS of delphi DX3 can not redirection is disabled

2013-04-25 Thread Angus Robertson - Magenta Systems Ltd
 I used HTTPCli of ICS in delphi 7, HTTPCli can handle redirection
 automatically,
 now I move my code to delphi XE3 and use the latest ICS, but 
 HTTPCli can
 not handle redirection automatically, Is it a bug? or What am I 
 missing?

The 'latest' ICS still handles redirection automatically. 

If you want to report a bug, you will need to be specific about what
internal versions of HTTPCli worked before, and not now, and which URLs
no longer redirect. 

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


Re: [twsocket] Lib PPP on serial modem

2013-04-25 Thread Angus Robertson - Magenta Systems Ltd
 I have tried the RASDIAL unit to connect on remote site with modem 
 and PPP.

I don't understand your problem, and RAS is not supported in this mailing
list.  

But you can try the full RAS component at: 

http://www.magsys.co.uk/delphi/magras.asp

Beware it will not solve any problems if Windows is unable to talk to the
modem due to hardware issues. 

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


Re: [twsocket] ICS of delphi DX3 can not redirection is disabled

2013-04-25 Thread Angus Robertson - Magenta Systems Ltd
 Now I use HTTPCli version is Version: 8.00 in Delphi XE3, and the
 link no longer redirect

Using the ICS frame browser demo, redirection works fine here, although
nothing useful is displayed since it's an audio clip, some headers
removed to keep this shorter:

FrameBrowser Get:
http://media.soundcloud.com/stream/EvkwidLYJX0C?stream_token=UUQGe
[0]  GET /stream/EvkwidLYJX0C?stream_token=UUQGe HTTP/1.1
[0]  HTTP/1.1 302 Moved Temporarily
[0]  Location:
http://ec-media.soundcloud.com/EvkwidLYJX0C.128.mp3?ff61182e3c2ecefa438cd0
2102d0e385713f0c1faf3b0339595665fc070deb1153437a8cc50fcf5df5446cc7a6d80703
e31311b9e16c48bdc354806dd5d714b613abe12468AWSAccessKeyId=AKIAJ4IAZE5EOI7P
A7VQExpires=1366880598Signature=1K94rAZVg0SkRaxlFjWltf%2FeVLs%3D
[0] StateChange: httpBodyReceived
[0] Connected to ec-media.soundcloud.com
[0]  GET
/EvkwidLYJX0C.128.mp3?ff61182e3c2ecefa438cd02102d0e385713f0c1faf3b03395956
65fc070deb1153437a8cc50fcf5df5446cc7a6d80703e31311b9e16c48bdc354806dd5d714
b613abe12468AWSAccessKeyId=AKIAJ4IAZE5EOI7PA7VQExpires=1366880598Signat
ure=1K94rAZVg0SkRaxlFjWltf%2FeVLs%3D HTTP/1.1
[0]  Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
[0]  HTTP/1.1 200 OK
[0]  Content-Type: audio/mpeg
[0]  Date: Thu, 25 Apr 2013 09:02:58 GMT
[0]  Content-Length: 382013
FrameBrowserGetPostRequestEx Done: Status 200
[0] Disconnected

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


Re: [twsocket] Which component to use?

2013-04-25 Thread Angus Robertson - Magenta Systems Ltd
 I would like to know the difference between the components
 and TWSocket TWSocketServer, do i need a software that will receive
 multiple simultaneous connections to POS terminals

You are talking about a server, and you'll find ICS server demos using
both TWSocket and TWSocketServer, since the latter was introduced a few
years after the former.  But TWSocketServer is best for new projects, and
is used for the ICS HTTP and FTP servers. 

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


Re: [twsocket] Need to Exclude Folder

2013-04-23 Thread Angus Robertson - Magenta Systems Ltd
 I have an application for backup that works on LAN. All data is 
 copied into
 a Folder and subfolders (please refer below pattern). Using MagFTP
 component I intend to syncronise the Local backup onto the FTP site
 (g:\Backups\*.*). My problem is that there is one folder that I 
 need to exclude (g:\Backups\tempfiles\*.*).
 Is it possible without using the Single File Upload method ?

TMagFtp has a string property IgnoreFileExt that allows you to specify a
semicolon delimited list of file extensions that will be ignored, ie
tmp;temp;bak.

There is also a binary property SpecificFiles that allows a list of files
to be downloaded or uploaded, the files names are a | delimited list
passed in SrcFName.  Beware I've not used this for a long time, can not
recall why it was added. 

I suspect what you really need to exclude a small number of files from a
large selection is a new event, somewhere after the calls to 
fMagFileCopy.SelectCopyFileList.  This function compares the source and
destination file directories and selects which will be transferred. You
could check SrcFileList for any you don't want to copy, and deselect them
by setting FrFileCopy := FCStateNone. 

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


Re: [twsocket] Connect issue?

2013-04-23 Thread Angus Robertson - Magenta Systems Ltd
 When using ICS Connect and Feat one after another, the log looks 
 like this:
 Like Connect would return prematurely, after USER command and not 
 ask for password. Has anyone seen this before?

No, never. 

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


Re: [twsocket] i using the THttpAppSrv in my app

2013-04-18 Thread Angus Robertson - Magenta Systems Ltd
 failed!
 i think there is nothing about wmi. but the ThttpAppsrv's probleam.
 does everyboy can make a simple srv_app to test it.?

So you are now using MagWmiGetInfoEx and still getting the connection
closed?  How many seconds does the connection stay open for the request?
Or does it stay and open and not send a response?

Exactly what WMI classes are you calling, in which order the name space
and exact names? 

I can test WMI in my THttpAppSrv application, but not until next week. 

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


Re: [twsocket] i using the THttpAppSrv in my app

2013-04-18 Thread Angus Robertson - Magenta Systems Ltd
 in the proc, i using superobject do deal with the json format date 
 for return.

For testing, you need to remove all this extra stuff from your
THttpAppSrv so only the WMI calls remain, nothing else.  

There is no purpose in anyone trying to reproduce your problem if you
only provide small extracts of the total functionality of your
application, where the real problem may be in some component you have not
told us about.  I've never heard of 'superobject'. 

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


Re: [twsocket] i using the THttpAppSrv in my app

2013-04-18 Thread Angus Robertson - Magenta Systems Ltd
 superobjectyou dont hear about it???

I rarely use Javascript. 

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


Re: [twsocket] MagFtp and SslContext

2013-04-17 Thread Angus Robertson - Magenta Systems Ltd
 I do not have much knowledge about SSL but I  presume SSL 
 certificates are required if my client decides to use a FTPS site. 

No, it is not necessary for client software to check SSL certificates to
use SSL connections, the data is still encrypted.  Checking the
certificate is an extra level of security to ensure the data is coming
from the correct server.

Certificate checking can be done, most of the code is there in TMagFtp,
but there is an extra overhead for each connection, and more errors to
handle if the certificate fails checks. 

Server software always needs a SSL certificate. 

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


Re: [twsocket] i using the THttpAppSrv in my app

2013-04-17 Thread Angus Robertson - Magenta Systems Ltd
 i using WbemScripting_TLB.pas,  also the uWmiDelphiClass.pas (from
 the google code). which just the oleobject.

Try using MagWmiGetInfoEx from:

http://www.magsys.co.uk/delphi/magwmi.asp

it should not take long to modify your application and will eliminate
possible problems with the code you found. 

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


Re: [twsocket] MagFtp and SslContext

2013-04-16 Thread Angus Robertson - Magenta Systems Ltd
 How do I specify Ssl Certificates in MagFtp component ?

Sorry, certificate chain and host checking was never fully implementing
in TMagFtp.  There is a lot of commented out code, probably taken from
the ICS FTP client SSL demo, that could be restored, but it's untested,
and includes a modal dialog box that is not ideal for a component. 

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


Re: [twsocket] check if given ip is in any of connected subnets

2013-04-16 Thread Angus Robertson - Magenta Systems Ltd
 I'm trying to figure out if a given ip address is in any of the
 subnets I'm connected to
 I assume I need to iterate through all connected NICS, and 
 calculate the size and location of that specific subnet using the 
 ip and netmask for that connection, and then see if given ip 
 address falls in that subnet?

The Internet Protocol Helper Component will get you the assigned IP
addresses and masks: 

http://www.magsys.co.uk/delphi/magiphlp.asp
 
 Can anybody give me a pointer in the right direction please? Is 
 there any api (or ics tool) which can do the subnet calculation for 
 me?

The trick with IP addresses is always to work with 32-bit unsigned double
words, AND and ORs give you the subnet limits, then it's simple range
comparisons.  Make sure the endian order is reversed for Intel.

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


Re: [twsocket] i using the THttpAppSrv in my app

2013-04-16 Thread Angus Robertson - Magenta Systems Ltd
 i found if i call the wmi ole object to get wmi data,THttpAppSrv  
 will hung and lose the 80 connection.

Calling WMI functions presumably to return information on a web page is
unlikely to something many people have done, I've certainly not. 

Are you using MagWmiGetInfoEx or some other WMI component? 

What WMI class are you calling? 

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


Re: [twsocket] Resume in Magenta

2013-04-12 Thread Angus Robertson - Magenta Systems Ltd
 In between I unplugged the Server LAN wire so as to break the
 Transfer. When I said to upload again it does not Resume.

As you can see from the logs, all the commands to correctly resume the
upload are being sent, but the control connection appears to drop at that
point:

!! FTP Error: FTP component not ready

Without any time stamps in the log, it's not possible to see if this was
instant or after a timeout.  

There is a property FailRepeat that I usually set to three so a failed
attempt retries twice more automatically in case of transient errors. 

For testing resume, you don't need to use massive files, you can slow
down the transfer to 25K a second or something on your LAN so that you
can halt the transfer part way through more easily: 

FTP.BandwidthLimit := bandwidth * KBYTE ;
FTP.Options := Options + [ftpBandwidthControl] ;

I've not specifically tested resume for a few years, I automatically FTP
hundreds of files to and from my public server daily, but it all just
works.  If you can reproduce the problem with the  TMagFtp v4 demo or DUN
Manager beta v3.10, I'll look into it.  You can also have an account on
ics.ftptest.org which is the latest ICS v8 FTP server, although you
probably won't want to test gig uploads (there are gig files on it to
download).  

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


Re: [twsocket] Unable to create TIcsWndControl hidden window.

2013-04-12 Thread Angus Robertson - Magenta Systems Ltd
 Unable to create TIcsWndControl hidden window. Error 1158
 How I can use 4-5K of TSmtpClis in my app ?

You are probably out of memory. You need a 64-bit server OS for a lot of
connections.  

You can use these APIs to get various memory information about your
application and the PC, to see what is causing your limit: 

GetProcessMemoryInfo, GlobalMemoryStatusEx and GetPerformanceInfo

My web server application logs this lot hourly:

23:00:10 Program Resources: Handles 225, Memory: Working Set 54.0M, Paged
Pool 131K, Non Paged Pool 19.0K, Peak NP Pool 928K
23:00:10 Global Memory Usage: Load 89%; Total Phys 4.00G; Free 432M;
Total Paging 8.17G; Free 4.73G; Total Virt 2.00G; Free 1.91G
23:00:10 Commit Total 3.45G, Commit Limit 179M, Commit Peak 3.81G,
Physical Total 4.00G, Physical Available 432M, System Cache 854M
23:00:10 Kernel Total 342M, Kernel Paged 223M, Kernel Nonpaged 119M,
Total Handle Count 24,671, Total Process Count 70, Total Thread Count 959

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


Re: [twsocket] Fwd: Date Time ?

2013-04-08 Thread Angus Robertson - Magenta Systems Ltd
 I am using TSslFtpClient and and need the DateTime of remote files.
 From what I understand the only way is via the Dir command.
 If so how do I parse list ? Is there fixed format ?

The DIR command is supported by all FTP servers, and can return numerous
different listing formats, essentially the OS dir listing.
In practice, you will find only UNIX or MS-DOS listings and you have to
parse them. Not UNIX format does not have the file time for files older
than one year. 

Better FTP servers also support the MLSD command which is a standardised
format.  

Both these command list only the current directory, if you need
sub-directories you have to keep changing directories and DIR or MLSD
again. 

The ICS FTP server adds XCMLSD and XDMLSD which are similar to MLSD but
provides recursive listings for sub-directories so will list hundreds of
directories in a couple of seconds, which takes several minutes with the
older commands. 

If you want a reliable working application use the high level FTP
component TMagFtp from: 

http://www.magsys.co.uk/delphi/magxfer.asp

which uses all the above listing techniques depending on what the server
supports using a single command BuildDirList, or SelectCopyFileList is
you only want to know which files are different to those on your local
disk, ie when updating a web site. 

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


Re: [twsocket] network adapter

2013-03-18 Thread Angus Robertson - Magenta Systems Ltd
 How to find out the List of network adpater ie IP address and 
 all active adapter twsocket

If you just mean all the active IP addresses on the PC, the
OverbyteIcsWSocket unit includes a public function: LocalIPList
that returns a TStringList of all the IPv4 and IPv6 addresses.  

It may also be called with parameters to get just one type of address:

LocalIPList (sfIPv4, IPPROTO_TCP)
LocalIPList (sfIPv6, IPPROTO_TCP)

If you need to know which IP addresses are allocated to specific adaptors,
you to use IpHlpAdaptersInfo from Internet Protocol Helper Components
from:  

http://www.magsys.co.uk/delphi/magiphlp.asp

which will shortly be updated for IPv6. 

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


[twsocket] Updating an old application

2013-03-11 Thread Angus Robertson - Magenta Systems Ltd
I'm slowly updating my old applications to support IPv6, one of them
simply refused to work with IPv6 without any obvious reason. 

I discovered that winsock ReqVerHigh/ReqVerLow were being set to 1.1,
whereas 2.2 is needed for IPv6.  This turned out to be TWSocket
components dropped onto three forms in the application which had saved
1.1 as design time properties but which never became updated as newer
versions of TWSocket came along with 2.2.  Updated the design properties
and IPv6 now works.  But very frustrating finding the issue. 

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


Re: [twsocket] Simultaneous TPing request using multithread.

2013-03-03 Thread Angus Robertson - Magenta Systems Ltd
 ICS V8 supports FireMonkey (Windows and OS X), if you do not want
 to support it please no not add you contribution to ICS V8.   

And ping and icmp don't currently work on OS X anyway, they should not
have been in the FireMonkey packages in the first place. 

 Because I currently do not have the spare time to fix your 
 contribution. 

If nobody has the time to support FireMonkey, it's support should be
removed from ICS.  We need to concentrate on platforms users actually
care about.  

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


Re: [twsocket] Simultaneous TPing request using multithread.

2013-03-03 Thread Angus Robertson - Magenta Systems Ltd
 Today I fixed the issue and checked in your contribution.

Thanks.
 
 Basically a unit included in IcsCommonDXE3Run may neither use the 
 VCL nor the FMX framework. And you added to OverbyteIcsIcmp.pas 
 OverbyteIcsWSocket.pas.

Yes, because you added a lot of IPv6 helper functions to WSocket and it
was more sensible to make use of tested shared code than continue to use
duplicated WSocket code in those two units and have to expand it
considerably. 

 Unless there's a cross-platform solution 

I do plan to added a ping using raw sockets that should be cross platform,
I've got a lot of the code in my raw socket monitoring component,
although it needs expanding for IPv6 packets.  

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


Re: [twsocket] Simultaneous TPing request using multithread.

2013-03-02 Thread Angus Robertson - Magenta Systems Ltd
 I need to build a network monitoring tool that will ping about a 
 1000 IP's on a regular basis,  I plan to use Thread-Pool for this.

I did a major rewrite of ICMP and Ping last month, including a new
threaded ping component and a trace route demo that sends off lots of
pings using threads. 

Unfortunately Arno decided it would not work on FireMonkey (about which
probably very few care) and he removed it from SVN.  Since I can not
actually build the FireMonkey packages in XE3 which are undocumented, get
too many silly errors, everything is on hold until I have sufficient
spare time to try and reverse engineer his changes.  

 I know there is an issue with doing simultaneous ICMP request 
 because all the listening socket receive the reply and this create
 confusion.

My older thread ping component has been sending dozens of simultaneous
requests for 10 years without any issues. 

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


[twsocket] SMTPUTF8

2013-02-28 Thread Angus Robertson - Magenta Systems Ltd
Has anyone found an SMTP server that supports the new ELHO SMTPUTF8
response, RFC 6531?

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


Re: [twsocket] IPv6 support on TPing

2013-02-13 Thread Angus Robertson - Magenta Systems Ltd
 Cool, I'll be able to test it a bit next weekend.

No problem, just need to test it with XE3 and 64-bit, and find out why
the sample no longer runs on XP.  

Although we've always been used to a blocking ping, it transpires
Microsoft added async ping using a callback with Windows 2000, which I
have implemented. Unfortunately it does not seem to actually work, the
return code says ERROR_IO_PENDING but the callback never happens. 
Googling I've not found a single example in any language using the
callback or anyone that has ever made it work. 

But I have added my threaded ping to ICS, which is how the trace route
works. 

I'm also trying to get another SIXXS tunnel for my public server (until
the firmware in my firewall gets IPv6 support) so I can make ICS servers
available on IPv6. 

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


Re: [twsocket] IPv6 support on TPing

2013-02-12 Thread Angus Robertson - Magenta Systems Ltd
   I'm doing some eval of this components but i found that  the 
 TPing component doesn't support IPv6 at the moment (ICS version 8).
 Am i right? or, may be i missed some component initialization call.

Ping IPv6 seems to be working now, do you want to test it?

Trace Route to: ipv6.google.com
Ping of 56 bytes took 29 msecs
 1 0ms  2a01:348:6:68c::2 PC19
 2 8ms  2a01:348:6:68c::1 gw-1677.lon-02.gb.sixxs.net
 311ms  2a01:348::4:0:3:1:1   gblon02.sixxs.net
 4 9ms  2a01:348:0:4::3::12a01:348:0:4::3::1
 511ms  2a01:348::36:1:1  xe-0-1-1.cs0.the.uk.goscomb.net
 6 9ms  2a01:348::24:1:1  xe-0-1-0.cs0.gs2.uk.goscomb.net
 713ms  2a01:348::40:1:1  xe-0-1-0-0.cs1.gs2.uk.goscomb.net
 812ms  2a01:348::41:1:1  xe-0-1-0.cs0.sov.uk.goscomb.net
 911ms  2a01:348::17:0:1  ge-1-1-5.rt0.sov.uk.goscomb.net
1010ms  2a01:348::51:0:1  xe-0-0-1-0.rt0.thn.uk.goscomb.net
1194ms  2001:7f8:4::3b41:12001:7f8:4::3b41:1
12 8ms  2001:4860::1:0:15f2001:4860::1:0:15f
13 9ms  2001:4860::8:0:2ddf   2001:4860::8:0:2ddf
1428ms  2001:4860::8:0:2ac4   2001:4860::8:0:2ac4
1528ms  2001:4860::2:0:87b2001:4860::2:0:87b
1726ms  2a00:1450:400c:c06::67wb-in-x67.1e100.net
Trace Route Completed

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


Re: [twsocket] SMTPCli: Use with non-local site to send emails?

2013-02-01 Thread Angus Robertson - Magenta Systems Ltd
 I set the Host to be smtp.xyz.com, AuthType: SMTPAuthLogin,  then 
 call Connect().
 The password is set later, which is wrong, but when I set it before 
 Connect(), it would not connect.

Look at OverbyteIcsMailSnd1.pas, you set the properties UserName,
Password and AuthType to smtpAuthAutoSelect, then call the Open method
(which calls Connect, Helo/Ehlo then Auth)) and all the authenticiation
is handled automatically. 

You can also look at Magenta Systems Mail Queue Component which
simplifies email and does automatic retries against multiple SMTP servers,
to ensure email does go.  

http://www.magsys.co.uk/delphi/magics.asp

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


Re: [twsocket] THttpAppSrv SSL support

2013-01-30 Thread Angus Robertson - Magenta Systems Ltd
 Are there any plans to support SSL in THttpAppSrv (eg. 
 THttpsAppSrv) in v7?

TSslHttpAppSrv is available in ICS v8, it was added last summer.  I use
it for one of my public web sites so it's well tested. 

https://www.telecom-tariffs.co.uk/

New development takes place in the latest ICS version, we can not keep
added features to all the old releases as well. 

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


Re: [twsocket] THttpAppSrv SSL support

2013-01-30 Thread Angus Robertson - Magenta Systems Ltd
 Thank you for Your answer. Are You know any time frame for V8 stable
 version?

V8 is stable, I've been using for all my applications for over six months.
There are no plans for ICS V9 at the moment, so V8 will be the main
version for the next couple of years. 

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


Re: [twsocket] SMTPCli: Use with non-local site to send emails?

2013-01-30 Thread Angus Robertson - Magenta Systems Ltd
 I soon have a web presence on xyz.com (not the real name) hosted by 
 Network Solutions.

Do you mean a shared web server, or a fully hosted server that you
control and on which you can install your own software? 

 Is it possible to use my mail server on mail.xyz.com to send the 
 emails and bypass my ISP?

If you set-up a mail server on mail.xyz.com (which is not usually part of
web hosting) you can do whatever you like.

I have mail.magsys.co.uk which is a SmarterMail windows email application
I control, and I can do what I like with it.  

If the hosting company controls mail.xyz.com, there will probably be spam
limits imposed. 

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


Re: [twsocket] ...SMTPClient

2013-01-29 Thread Angus Robertson - Magenta Systems Ltd
 In addition to my other message, it is so much faster to send 
 multiple recipients in the To rather then sending them individually.

It may be faster, but if your emails are deleted as spam due to
'undisclosed recipients', why send the email in the first place. 

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


Re: [twsocket] Resend: TSslSmtpCli...

2013-01-28 Thread Angus Robertson - Magenta Systems Ltd
 The confusion is TSslSmtpCli is not listed on the main OverByte ICS
 component page, any wiki, faq, stackoverflow, tamarack or example.

It is listed in the main readme file, together with the SSL mail demo
project. 

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


Re: [twsocket] ...SMTPClient

2013-01-27 Thread Angus Robertson - Magenta Systems Ltd
 I need to add up to 200,000 names to the ToList, which could be 
 about 4,000,000 characters.
 Can T...SMTPCli handle this quantity?

Most ISPs have blocks on their SMTP relay servers to prevent mass mailing
by spammers, typically a few hundred or thousand messages a day, after
which your account may be blocked.  There may also be a limit of 25 to
100 recipients per message.  

So unless you are sending using your own SMTP relay server, sending
200,000 emails is unlikely to be an issue, you won't be sending any atall.


I'm sure there is a limit in the SMTP specs for recipients, but you are
more likely to hit an ISP limit first. 

Also, you may find emails send using BCC are more likely to be detected
as spam, it's much better to individually address emails, although still
within your ISP limits.   This is how my own mass mailer works, written
with ICS 15 years ago and hardly touched since.  

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


Re: [twsocket] IPv6 support on TPing

2013-01-24 Thread Angus Robertson - Magenta Systems Ltd
  I'm doing some eval of this components but i found that  the 
 TPing component doesn't support IPv6 at the moment (ICS version 8).

I'm planning to update TPing to support IPv6 and the correct DLL in
February, I need for my applications. 

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


Re: [twsocket] Binary download problem solving

2012-12-19 Thread Angus Robertson - Magenta Systems Ltd
 There is an issue, which is not directly related to ICS, but since 
 ICS provides
 a webserver that may help in solving it, I'd like to hear some 
 advices from you.
 
 The problem happens with Chrome and Android's browsers while 
 downloading binary files
 from a webserver. You may read description of the bug at 
 http://code.google.com/p/chromium/issues/detail?id=104331

This is a long one year old thread, during which time no-one has found a
solution.  I only skimmed the thread, but it seems a badly behaved
download manager is involved and messing with server headings is an
attempt to make Chrome download something in the hope it's better.

It really looks like a Goggle issue, let them fix it. 

Is this problem reproducible with Chrome under Windows, or is it simply
non-Windows platforms?

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


Re: [twsocket] Binary download problem solving

2012-12-19 Thread Angus Robertson - Magenta Systems Ltd
 I encounter the problem both in Chrome under Windows and in 
 Android's browser.

If it can be reproduced reliably under Windows, diagnosing it might be
easier, but I don't have Chrome installed at present and don't use any
non-Windows devices. 

 This is why I think there should be a workaround
 on a server-side to cheet the browser somehow.

Are you then planning to use the ICS web server for your web site?  Or is
this merely an intellectual exercise to find a fix for other web servers?


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


Re: [twsocket] Binary download problem solving

2012-12-19 Thread Angus Robertson - Magenta Systems Ltd
 What do you mean by diagnosing? The problem is reproducable,

For you, not for me, yet. 

 Do you have some instruction for the diagnostic process?

Looking at detailed server logs to see what is requested and sent, maybe
Wireshark to see how the session ends.  

Trying different MIME content types to see if downloads work when done
properly, for instance application/binary or even application/zip.   

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


Re: [twsocket] How can I know the IP address?

2012-12-16 Thread Angus Robertson - Magenta Systems Ltd
 If I have a wired local area connection and some wireless 
 connection how can I know which I'm connected through? 

The Internet Protocol Helper Component at: 

http://www.magsys.co.uk/delphi/magiphlp.asp

lists all the adaptors and the IP allocated to them.  

ICS can only give you a combined list of IP addresses from
OverbyteIcsWSocket.LocalIPList.

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


Re: [twsocket] CookieManager?

2012-12-12 Thread Angus Robertson - Magenta Systems Ltd
 Is there a cookie manager component like in INDY?

Yes, it was added to ICS v8 earlier this year, TIcsCookies in
OverbyteIcsCookies, from the code: 

Overview


Provides a memory store for persistent and non-persistent cookies
captured from the HTTP SetCookie header, and builds a Cookie header for
any stored cookies for a URL. Persistent cookies are saved and re-read
from a simple CSV file. OverbyteIcsHttpTst1.pas shows how to handle
cookies, very few new linesa, also look at the browser demo to see how
it's used.


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


Re: [twsocket] Did I find a bug in THttpCli?

2012-12-11 Thread Angus Robertson - Magenta Systems Ltd
 If you GET this URL:
 http://www.htmlvalidator.com/test/cookies/test-redirect.php
 
 Then you get Server port is 80. with the ICS demo, but put the 
 same URL in a browser and you get Server port is 8080.

I have reproduced this using the ICS browser demo, which is useful for
testing stuff such as this due to logging protocol and showing you the
web page at the same time.  

I'll look at a fix, since I have relative relocation bug to fix as well. 

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


Re: [twsocket] Did I find a bug in THttpCli?

2012-12-11 Thread Angus Robertson - Magenta Systems Ltd
 Before you try to fix/break something that works, I urge you to 
 check with Wireshark that the redirection works as expected to port 
 number 8080, the only problem I see so far is property Location
 should likely include the port number in this test case.

The first thing I'll do is fix the logging so we can actually see what is
happening, it should not be necessary to use Wireshark to debug a program.


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


Re: [twsocket] MagFTP or ICS FTP Client

2012-12-05 Thread Angus Robertson - Magenta Systems Ltd
 Using either MagFTP or the ICS FTP Client how can I 
 determine if a File Exists on an FTP Server?

TMagFtp has a method FtpCheckFile that returns the file size and date
time stamp.  

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


Re: [twsocket] FTP Client - Large files

2012-12-04 Thread Angus Robertson - Magenta Systems Ltd
 How do I log what is being sent? I have everything ticked in the 
 ICS logger.

The ICS logger is really designed for low level packet logging, although
I wrote it a long time ago, I rarely use it since the low level stuff
just works. 

MagentaFtp3.pas shows how logging is done, from the events:
onFtpClientDisplay, onFtpError, OnFtpCommand, OnFtpResponse, nFtpSessConn,
OnFtpSessClosed, OnFtpRequestDone and OnFtpStateChange, although my code
is commented out in the last two.  

I did however ask you to log OnFtpStateChange last week, since that is
what causes my transfers to work.  

 When I use ConnectFeatAsync I get only these 3 things specified in 
 the log:
 
 MDTM
 REST: STREAM
 SIZE

It's a relatively primitive FTP server, not from Microsoft, no support
for UTF8, most server written in the last 10 years support more optional
FTP features. 

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


Re: [twsocket] FTP Client - Large files

2012-12-04 Thread Angus Robertson - Magenta Systems Ltd
 I have the OnFtpStateChange producing messages which I can add to 
 my history log, but is there a way of adding these messages into
 the ICS logger?

IcsLogger.DoDebugLog(Self, LogOption, Msg);

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


[twsocket] HTTP relocation

2012-11-30 Thread Angus Robertson - Magenta Systems Ltd
= Connected to: www.cytauk.com
 GET / HTTP/1.0
 Host: www.cytauk.com
 HTTP/1.1 302 Moved Temporarily
 Location: ./cytauk2/
= Connected to: www.cytauk.com
 GET /./cytauk2/ HTTP/1.0
 Host: www.cytauk.com
 HTTP/1.1 404 Not Found

Firefox seems to redirect to www.cytauk.com/cytauk2/ ignoring the extra ./
in the relocation header.  

Is the server wrong, Firefox too forgiving, or do we need a fix? 

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


Re: [twsocket] FTP Client - Large files

2012-11-29 Thread Angus Robertson - Magenta Systems Ltd
 Attached is a zipped up text file obtained from the ICS logger 

The mailing list automatically drops file attachments since they are of
no interest to 99% of recipients. 

You need to email directly to me or post a link to a download. 

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


Re: [twsocket] FTP Client - Large files

2012-11-29 Thread Angus Robertson - Magenta Systems Ltd
 Files can be found here:

You are not currently logging any commands sent by the FTP component
which is normally quite useful. 

You are not sending the FEAT command which might hint as to which FTP
server is at fault, use ConnectFeatAsync instead of ConnectAsync. 

In the first log, you seem to have an extra shut down for handle 1988
which appears to be from any unlogged earlier FTP session that was
unfinshed before you started this session.  

12:38:03:331 0322F130 Socket handle created 1992
12:38:03:509 ! Data Session requested
12:38:03:510 0322F9B0 Socket accepted 1944
12:38:03:511 0322F9B0 TCustomWSocket.Shutdown 1 1988
12:38:03:512 ! Data Session opened
12:38:03:514 |150 Opening BINARY mode data connection 

This may be unconnected, but the component should not really know about
earlier handles at this point.  

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


Re: [twsocket] FTP Client - Large files

2012-11-28 Thread Angus Robertson - Magenta Systems Ltd
 It would appear that this FTP site does not send a FTP 226 Transfer
 Complete for large files. 

So it's a faulty FTP server, not a problem with the FTP client.  

I've already asked what make of FTP software and am waiting for your
response.  You have not posted any FTP logs (the full FTP session) which
might identify it. 

 is there something special about putAsync th

I explained all that yesterday. 

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


Re: [twsocket] FTP Client - Large files

2012-11-28 Thread Angus Robertson - Magenta Systems Ltd
 Filezilla seems to handle with a no response timeout, followed by a
 query, some times even a  reconnect, to check if the file is
 effectively there, and with the correct size. 

Similar features are the benefit of using the TMagFtp high level
component.   It also checks the correct sized file has been uploaded,
will do a CRC32 or MD5 check to ensure it's not been corrupted, and  will
repeat the upload if necessary.  

But I'm not aware TMagFtp specifically handles a missing response, unless
by accident!  Most servers will timeout the control connection anyway
once activity ceases that could cause TMagFtp to close everything down.
Without having seen any proper FTP logs for this bad server, this is all
conjecture. 

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


Re: [twsocket] FTP Client - Large files

2012-11-27 Thread Angus Robertson - Magenta Systems Ltd
 My code is basically a state machine. In the FtpRequestDone event, 
 it decides what to do next. 

I used a similar state machine in another application, but prefer the
sync calls for complex applications, and then use a thread per transfer.
TMagFtp has been tested with 200 simultaneous downloads. 

You do have to be very careful not to call the message pump from within
RequestDone or things can get very confused.  Do not call any sync
methods that will call the message pump, ie only call CwdAsync not Cwd. 

 So the question is: What are you doing in your demo that is 
 different.

Using sync methods with WaitUntilReady which loops calling the message
pump until State is ftpReady or ftpInternalReady, rather than expecting
the FtpRequestDone event to be called. 

It is possible there is a strange component bug and the state is being
changed without FtpRequestDone being called.  My component does not use
FtpRequestDone atall.  

You could try checking the StateChange event as well to see if that is
called when your transfer finishes, or just check the State property in
the fail safe timer I assume you have running to handle errors and stop
the application waiting for days. 

 Wireshark shows you are doing ALLO

Not sure why you using Wireshark, the FTP component has all the events
you need to log the FTP protocol, even without the logger component.  

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


Re: [twsocket] FTP Client - Large files

2012-11-26 Thread Angus Robertson - Magenta Systems Ltd
 My code just does putAsync and waits for the ftpPutAsync event.
 I don't know exactly how the xferdemo3w does it

You have all the source code for TMagFtp, so you can easily check.  There
are probably two main differences: 

1 - TMagFtp uses the sync FTP calls and WaitUntilReady, so check that
function for special handling.  

2 - The component has been developed and tested over several years and so
is very solid with a lot of special error handling to make it very stable.


One caution, xferdemo3w uses a 'special' widestring version of ICS v8
that works with Delphi 2007, to use the unchanged ICS version test
against xferdemo3 which is pure ICS. 

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


Re: [twsocket] FTP Client - Large files

2012-11-24 Thread Angus Robertson - Magenta Systems Ltd
 *** So the duff FTP site will accept the upload of the file, but 
 for some reason the FTP client does not generate any event
 (FTPRequestDone) at the end of the upload.

And yet you said earlier that the TMagFtp component works correctly,
presumably with the same bad FTP server and ICS version?  

Do you know the software used on the bad server?  I have a public FTP
server with several different FTP servers, including ICS at
ics.ftptest.co.uk. 

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


Re: [twsocket] FTP Client - Unicode Filenames

2012-11-19 Thread Angus Robertson - Magenta Systems Ltd
 However I have now sort of fixed the problem. If I convert the 
 filename to UTF8 

The component does that, when working in Unicode.  Remember that
responses from the FTP server including directory listings will be UTF8
as well.  

You must still send the OPTS UTF8 ON command, otherwise the server may
treat UTF8 as ASCII. 

 MAINICON ICON MagentaXferXE2Run_Icon.ico

Just rename an ico file from one of the other compiler versions. 

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


Re: [twsocket] ICS WebServer Demo

2012-11-14 Thread Angus Robertson - Magenta Systems Ltd
 The problem was that the World Wide Web Publishing Services was 
 running.

There is a registry setting that makes IIS listen only on specific IP
addresses when it starts, so you can run IIS and ICS servers at the same
time.  

HLM\SYSTEM\CurrentControlSet\Services\HTTP\Parameters\ListenOnlyList

or add them using netsh commands:

netsh http add iplisten ipaddress=217.146.102.140:80

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


Re: [twsocket] ICS WebServer Demo

2012-11-13 Thread Angus Robertson - Magenta Systems Ltd
 Just started to look at the Web Server demo. When I run it I get 
 10013 Bind error.
 Any clues as to how to proceed?

Close the existing web server application running on the same IP address
and port, use a different port for the ICS web server or add another IP
address to your PC and make sure other applications don't try and use it
(IIS defaults to using all IPs). 

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


Re: [twsocket] Minor omission fixed for improved Web-server operation

2012-11-11 Thread Angus Robertson - Magenta Systems Ltd
 What's the scenario where I need to change the mime type after I 
 have searched for it already?

So the application can easily check what actual MIME type has been used,
and dynamically change it if incorrect. 

 The component has excess of these Triggerxxx methods.

Because it's evolved over 15 years of development, different developers
use it in different ways, and we try to keep it backward compatible to
avoid breading existing applications. 

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


Re: [twsocket] Minor omission fixed for improved Web-serveroperation

2012-11-10 Thread Angus Robertson - Magenta Systems Ltd
 Did you mean obsolete in V8 trunk? In the latest stable V7 it is 
 used by default.

It was added in V7.46.  The old stuff is left behind for backward
compatibility but will not be enhanced which is what you requested. 

 It's not clear how to switch to the mode that mime-types to be read 
 from Windows Registry by default?

You drop TMimeTypesList onto the form and attach it to all your server
instances, or add it in code.  

Look at the OverbyteIcsWebServ demo to see how it's attached, and
OverbyteIcsMimeDemo allows you to see what MIME types it picks up from
the registry and how to modify the list.  

The registry does include: .svg=image/svg+xml but not
application/javascript, although it is in the mime.types files used as an
alternative.  Or you can add it using the AddContentType method. 

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


Re: [twsocket] Minor omission fixed for improved Web-server operation

2012-11-10 Thread Angus Robertson - Magenta Systems Ltd
 I think loading hundreds of types from Registry when 'js' is 
 missing in the default list is overkill, because most of them 
 are not Internet-involved.

Everyone has different requirements, TMimeTypeList is designed to support
email as well where many different file types may get sent as
attachments.

The lack of application/javascript, must look at IIS to see how it
handles such files. 

 now I'd propose to revise TMimeTypeList.Create,
 where the default types are registered, and populate it with the 
 omitted types, which should be there by default, imho.

That can be done.

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


Re: [twsocket] Minor omission fixed for improved Web-server operation

2012-11-09 Thread Angus Robertson - Magenta Systems Ltd
 In the module OverbyteIcsHttpSrv.pas, in the function 
 DocumentToContentType

This function is now obsolete, the latest versions of the web server use
the new TMimeTypesList component which takes mapping from the Windows
classes registry, from a file or allows you to add your own extra MIME
types. 

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


Re: [twsocket] Ftp client

2012-11-07 Thread Angus Robertson - Magenta Systems Ltd
 I use TFtpClient to upload data to a FTP sites. It works if the FTP 
 site has a hostname like ftp.yoursite.com
 But now I need to upload to a site with an IP address, which is 
 ftp://196.211.60.155  

Use the IP address alone instead of the hostname, ignore the ftp:// which
is only intended for use in web browsers. 

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


Re: [twsocket] Optimal number of TWSocket per thread

2012-11-07 Thread Angus Robertson - Magenta Systems Ltd
 How many TSmtpCli(s) should be used inside one TThread ?
 I need to send about 4000 messages in parallel, so I need 4000 
 TSmtpCli(s).
 At this time I try to use 25 TSmtpCli per Thread but see very high 
 CPU usage and app interface responding this delays..

The 'app interface' could be your problem, if you are calling the main
thread using synchronise to update a GUI dynamically.  Ensure you don't
call synchronise more than once every few (configurable) seconds which is
quite adequate to keep someone watching happy that it has not died. 

ICS will usually handle a few hundred async component instances quite
happily in the same thread all processing at the same time.  

In your case, once you have written the code to support more than one
instance and more than one thread, just make it totally configurable so
you can try 10 threads with 400 instance, or 40 threads with 100 instance,
etc, so you can easily experiment. 

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


Re: [twsocket] Optimal number of TWSocket per thread

2012-11-07 Thread Angus Robertson - Magenta Systems Ltd
 I perform some tests but cannot send fasten than 200 megabit/sec.

Which is pretty good performance, presumably you need more because this
is running on a hosted server with gigabyte connectivity? 

 I see RFC 2821 and found what max line length can be 1000 
 characters! 

Not strictly relevant, I think that is for text, not MIME. 

 My question is: why message data send line-by-line instead of larger
 portions ? 

But that does not mean SmtpCli can not send multiple MIME lines at a time
using Send or something, reducing the number of function calls.  

It was probably written to send a line at time at a time when were all
using slow modems to communicate with each other.   

It is probably a relatively simple change to SmtpCli, but finding the
time to look at it is difficult for all of us.  Is it something you can
change yourself? 

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


Re: [twsocket] State of IP V6 support?

2012-10-23 Thread Angus Robertson - Magenta Systems Ltd
 I'd like to ask a few questions with regard to this change:
 1. What is the current state of IP V6 support in ICS? 
 - Ready for production use
 - Work in progress, already useable
 - Not ready for primetime
 2. ICS version
 - Does ICS V7 support IP V6? 
 - Does ICS V8 support IP V6?

Only ICS V8 supports IPv6.  

ICS V8 is ready for production use, I am using it all my ICS applications.
But testing of IPv6 itself is limited due to issues such as very few
firewalls and routers supporting IPv6.  I have a public IPv6 address
allocation (2a00:1940:0001:0002::/64), but can not use it yet. 

I've done limited testing with FTP and HTTP on my internal network, but
none yet on the public internet until Sonicwall offers IPv6 support for
my firewalls (which means buying new hardware).  

 3. If I need to switch to ICS V8
 - Any breaking changes between ICS V7 and V8?
 - Any major changes necessary in my legacy code if I just want to 
 keep IP V4? 

You need to check readme8.txt for details on updating, all the
directories have changed and some minor functions gone.  There are no
program changes needed to support IPv4, but you will need changes for
IPv6. 

 4. Going from IP V4 to V6
 - Any documentation/examples/tutorials available

No documentation yet, I am planning to write a getting started guide for
IPv6, but have not had time yet.  You'll need to look at the IPv6
implementations in the HTTP and FTP server components to see how to
implement IPv6 in your own applications, and the new demos
OverbyteIcsTcpSrvIPv6.  

Note that IPv6 is not yet supported by all the components, ping in
particular is missing, which I plan to do next month. 

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


Re: [twsocket] TiggerSessionClosed...

2012-10-11 Thread Angus Robertson - Magenta Systems Ltd
 It is on shutdown so I am not worried. The issue is FastMM reports 
 the leak each time I quit and that is a pain.

It is probably a false report.  I use the ICS web server which uses
SocketServer, and there are no memory leaks after over 100,000
connections.  

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


Re: [twsocket] TiggerSessionClosed...

2012-10-11 Thread Angus Robertson - Magenta Systems Ltd
  It is probably a false report...
 MadExcept also reports it as a memory leak.

So after say 10,000 connections, how much extra memory is your
application using than when it started?  The VCL often leaks small
amounts of memory, but unless is cumulative it really does not matter. 

Use something like:

var
ProcMem: TProcessMemoryCounters;
begin
GetProcessMemoryInfo (GetCurrentProcess, @ProcMem,
SizeOf(ProcMem)) ;
with ProcMem do
begin
  AddLogLine ('Program Memory Usage: Working Set ' + 
IntToKbyte (WorkingSetSize) + ', Paged Pool ' +
IntToKbyte (QuotaPagedPoolUsage) +
', Non Paged Pool ' + IntToKbyte (QuotaNonPagedPoolUsage)) ;
end ;
end;

You can also log program handle usage and global memory and handle usage
to find serious problems. 

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


Re: [twsocket] deflate for OverbyteIcsHttpCCodZLib

2012-10-08 Thread Angus Robertson - Magenta Systems Ltd
 Tested with this website http://myanimelist.net/malappinfo.php
 
 If I enable content encoding, then the data received isn't 
 compressed unless I add deflate.

Whether the site compresses the data is not the issue, it's whether the
ICS component can decompress anything with the change you proposed.  And
my testing shows not.  

I suspect I know the reason, if a compression type of 'gzip, deflate' is
added, it expects exactly that string to be returned, the component does
not parse the separate words.  

Your test site also does not use deflate, testing with the ICS browser
demo gives:

[0]  GET /malappinfo.php HTTP/1.1
[0]  Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
[0]  Connection: Keep-Alive
[0]  Accept-Encoding: gzip, deflate

[0]  HTTP/1.1 200 OK
[0]  Date: Mon, 08 Oct 2012 08:41:14 GMT
[0]  Server: Apache/2
[0]  X-Powered-By: PHP/5.1.6
[0]  Vary: Accept-Encoding
[0]  Content-Encoding: gzip
[0]  X-Served-By: app2v-mal.ao.prd.lax
[0]  Content-Length: 76

so it returns gzip not deflate, and ICS fails to decode the XML. 

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


Re: [twsocket] deflate for OverbyteIcsHttpCCodZLib

2012-10-08 Thread Angus Robertson - Magenta Systems Ltd
 Tested with this website http://myanimelist.net/malappinfo.php
 
 If I enable content encoding, then the data received isn't 
 compressed unless I add deflate.

Found and fixed the bug in OverbyteIcsHttpContCod, it was parsing
multiple encodings in the response header rather than the request header.


Your test site still ignores deflate, but decodes correctly with gzip,
maybe they reconfigured the server since you reported this issue in early
2011.  

But deflate does work with the ICS web server, much to my surprise since
I added that feature a few years ago. 

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


Re: [twsocket] deflate for OverbyteIcsHttpCCodZLib

2012-10-07 Thread Angus Robertson - Magenta Systems Ltd
 Please add the following modification to OverbyteIcsHttpCCodZLib, I 
 was sad to see it's not yet included in the last V8 :
 
 class function THttpCCodzlib.GetCoding: String;
 begin
 Result := 'gzip, deflate';
 end;

Have you actually tested this?  

If I make what seems to be a simple change, all pages with gzip decoding
fail to decode and display.  I've looked briefly to see what is failing,
but the coding of THttpContCodHandler is convoluted and the reason is not
obvious.  

This is why we are careful about making such changes, and ensure they are
tested thoroughly.

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


Re: [twsocket] FTP Error Code and Messages

2012-10-04 Thread Angus Robertson - Magenta Systems Ltd
 Where can I get a list of all the possible error code and error 
 messages for the methods in the FTP component.

Sorry, there is no such published list.  Most errors come from Winsock
calls, you'll need to look through the source code to see what other
errors can be posted.

The only documentation for the FTP component is the Wiki page, but it's
years out of date and missing most important methods. 

http://wiki.overbyte.be/wiki/index.php/TFtpClient

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


Re: [twsocket] How to save attachments - MimeDemo

2012-10-02 Thread Angus Robertson - Magenta Systems Ltd
  I am using Delphi 7 and learning the 
 component OverbyteIcsMimeDemo, I am writing a program to read my 
 messages and save them as text files and save any attachments as 
 separate files.  I seem to have grasped the export of text data 
 however any attempt at save the attachments fails and I simply do 
 not understand
  how to for example identify a pdf attachment and save it to disk 
 or in fact any attachment.

Run OverbyteIcsMimeDemo, specify mime-demo3.txt and click 'Decode File
Extended'.  This will decode all MIME parts and load them into an array
MimeDecodeEx.PartInfos, with one record for each part, reported similarly
to this (edited):
Part 6, Content: image/jpeg, Size: 4902, Name: wt_logo_210x47.jpg,
FileName: , Encoding: base64, Charset: , ApplType: , Content Id:
453445709@24012008-0DED
Part 7, Content: image/gif, Size: 4979, Name: Watch-the-film1.gif,
FileName: , Encoding: base64, Charset: , ApplType: , Content Id:
453445709@24012008-0DF4
Part 10, Content: application/vnd.ms-excel, Size: 75776, Name: D10.xls,
FileName: D10.xls, Encoding: base64, Charset: , ApplType: vnd.ms-excel,
Content Id: 

Your application needs to loop through the different PartInfos records in
the array, similarly to DecodeFileExButtonClick, checking PContentType
which contains the MIME type for each attachment, ie image/jpeg,
application/vnd.ms-excel or application/pdf for Acrobat files.  Sometimes
the PName and/or PFileName will have a complete file name with file
extension, sometimes they will be blank. 

You can use the function ContentTypeGetExtn to get the Windows defined
file extension for any MIME type if you want to build your own file name.


I guess the one thing missing from the demo is how to save the content,
which is patiently waiting in PartStream, so use the SaveToFile method: 

try
  MimeDecodeEx.PartInfos [I].PartStream.SaveToFile (fname) ;
except
  Log('!! Failed to Save Attachment) ;
end ;

Note the V8 OverbyteIcsMimeDemo dfm file seems to have got corrupted and
is missing several new buttons added to test TMimeTypesList, I'll fix it
later today. 

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


Re: [twsocket] How to save attachments - MimeDemo

2012-10-02 Thread Angus Robertson - Magenta Systems Ltd
 Thank you for the prompt reply and I look forward to your updated 
 dfm file!

I've already updated the V8 SVN, it will get zipped overnight. 

I also improved the demo slightly to use ContentTypeGetExtn which was not
there before. 

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


Re: [twsocket] FTPCli in thread

2012-09-19 Thread Angus Robertson - Magenta Systems Ltd
 *Subject:* [twsocket] FTPCli in thread
 *From:* Fredrik Bergström fredrik...@ko2000.nu
 *To:* twsocket@elists.org
 *Date:* Mon, 17 Sep 2012 19:41:01 +0200
 
 Hi,
 
 I started writing an message to this list about an timeout-issue we 
 have been having, but I think it may be better for me to first ask 
 for some guidance on how to run OverbyteIcsFtpCli properly from a 
 thread.
 I know we should have some kind of message pump running in the 
 thread, but would it be ok to have something like this?

TMagFtp from:

http://www.magsys.co.uk/delphi/magxfer.asp

uses FtpCli in a thread, and has a demo program to run 200 FTP sessions
simultaneously.  But it uses sync methods, since the thread is dedicated
to FTP and does not have a form to keep responsive.  

The most important issue is to create the FTP component in the Execute
method of the thread so the message window has the correct context, and
set Multithreaded to true so the ICS message pump is used while waiting
for sync methods to complete.  Nothing more complicated than that. 

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


Re: [twsocket] FTPclient Error 426

2012-09-19 Thread Angus Robertson - Magenta Systems Ltd
 When I copy the exe to another computer Window's XP every FTP 
 server (8 different servers) we connect to gives an ErrCode = 426 
 with a message Operation Aborted.

When FTP fails to run on a specific computer, it's nearly always
configuration of that computer, usually a firewall or router stopping it
working.  Sometimes changing to Passive mode can help. 

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


Re: [twsocket] FTPclient Error 426

2012-09-19 Thread Angus Robertson - Magenta Systems Ltd
 I really like the component. One question is there more detailed 
 help then the one online.

Sorry, it has always been hard to find volunteers to document the ICS
library, and in particular keep it updated for the constant changes we
make.  The developers all contribute their efforts free, and there is
only so much time we can spend.  

As I said earlier today, you can look at the code in my high level
TMagFtp component from:

http://www.magsys.co.uk/delphi/magxfer.asp

which makes FTP very easy to use, and is extensively tested over many
years.  

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


Re: [twsocket] FTPCli in thread

2012-09-19 Thread Angus Robertson - Magenta Systems Ltd
 We are running this code for testing, as it shows the issue better:
 (Code has been stripped of error handling, etc.)

I don't see anything wrong with your code sample, but you would be better
using the tried and tested code from the WaitUntilReady function which
duplicates what you are trying to do, but tests the State property to see
when something is finished. 

Or just use the Dir sync function which calls WaitUntilReady. 

Sometimes TCP/IP does not behave as you expect when connections don't
close properly, which seems to be your problem, which is why TMagFtp has
the ability to repeat functions on failure. 

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


Re: [twsocket] ICS support for RAD Studio XE3

2012-09-14 Thread Angus Robertson - Magenta Systems Ltd
Support for Delphi and C++ Builder XE3 is now available in ICS V7
available from: 

http://wiki.overbyte.be/wiki/index.php/ICS_Download

Also, the ICS V8 XE3 package has been corrected to add some components.

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


Re: [twsocket] ICS support for RAD Studio XE3

2012-09-08 Thread Angus Robertson - Magenta Systems Ltd
 When I click on the ICS-V8 Beta Snapshot, link 
 http://wiki.overbyte.be/arch/change-log-icsv8.xml
 I get this error: Object not found!

The zip download link always worked, but viewing the changes log failed
due to two missing XML/XLS files, one from the Wiki site, one from the
SVN server.  

I've now moved all XML files to the SVN server, so new releases only need
to be updated in one place, and everything is now working again.

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


[twsocket] ICS support for RAD Studio XE3

2012-09-07 Thread Angus Robertson - Magenta Systems Ltd
Support for Delphi and C++ Builder XE3 is now available in ICS V8 beta
available from: 

http://wiki.overbyte.be/wiki/index.php/ICS_Download

ICS V8 includes support for IPv6 and the FireMonkey FMX framework for
Windows and Mac OS X.  Thanks to Arno for many months of work
implementing and testing these changes.  

ICS V7 currently only supports up to RAD Studio XE2, but support for XE3
will be added shortly (but not FireMonkey).  

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


Re: [twsocket] TSslSmtpCli won't complete TLS on port 25

2012-09-06 Thread Angus Robertson - Magenta Systems Ltd
 I updated my AV software and the problem disappeared! Looking back,
 it may have started after the last AV update.

Excellent, although I'm surprised anti-virus software is monitoring port
25 for outgoing email, and worse corrupting it.  

What make? 

I've had AV software corrupt FTP transfers in the past, sometimes
accidentally, sometimes deliberately.  

The most annoying was my attempt to download a 6 gig Virtual Machine
image which my hardware firewall stopped at 4 gigs when it found a
development tool many AV packages consider a hacking tool.  My FTP
application kept repeating the download for 12 hours until I stopped it
manually. 

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


Re: [twsocket] TSslSmtpCli won't complete TLS on port 25

2012-09-03 Thread Angus Robertson - Magenta Systems Ltd
  Here's the problem, there's nothing more received but a 
  connection close after around 10 seconds?
 
 Ok, now we know, how do I fix it? I have no idea.

This is unlikely to be specifically an ICS issue since there is no
problem on ports other than 25, you need to find out why no further data
is being received.  

It could be firewall/anti-spam software or appliances, a router, your ISP,
etc.  Does it fail on multiple PCs, with different internet connections
and ISPs?  

Sorry we can not be more specific, but until an issue such as this 
can be reliably reproduced, it can not fixed. 

The only odd thing I've seen is you are using OpenSSL 1.0.0d, whereas I
still use v0.9.8r which has a much longer stable history. 

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


Re: [twsocket] THTTPserver...

2012-08-31 Thread Angus Robertson - Magenta Systems Ltd
 I need to log the IP address of the client when it connects to the 
 server.

Look at the Web Application Server sample,
OverbyteIcsWebAppServerMain.pas, which is similar to the main web server.
It shows how to write W3C format log file from the AfterAnswer event,
including how much data was sent.  

If you need to check the IP before processing the request, to blacklist
it or display the IP in a response, use the BeforeProcessRequest event.  

In both case use Client.GetPeerAddr to get the remote IP. 

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


Re: [twsocket] TSslSmtpCli won't complete TLS on port 25

2012-08-23 Thread Angus Robertson - Magenta Systems Ltd
 I'm having a problem with TSslSmtpCli. It won't complete a TLS
 connection on port 25.
 This happens regardless of the server.

How many different SMTP servers?  

I use STARTTLS with smtp.gmail.com on port 25 without any problems, try
it.  

If it fails, it's probably your ISP doing strange things with port 25,
like redirecting it their own SMTP server that does not support SSL. 

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


Re: [twsocket] [PATCH] HttpSrv: Fix in THttpRangeStream for incomplete reads

2012-08-21 Thread Angus Robertson - Magenta Systems Ltd
 The included patch fixes this bug. It would be great if you could 
 consider including the patch in the upstream version of ICS.

Thanks, the V8 repository will be updated this morning. 

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


Re: [twsocket] [PATCH] HttpSrv: Fix in THttpRangeStream for incomplete reads

2012-08-21 Thread Angus Robertson - Magenta Systems Ltd
  Thanks, the V8 repository will be updated this morning. 
 Nice. Any chance the patch could also be applied to V7 (trunk)?

OK, both V7 and V8 are updated with your fix, and the 'nightly' zips
updated early.  

I also added another web server fix that previously was only in V8. 

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


Re: [twsocket] Problem with lost TCP IP messages

2012-07-30 Thread Angus Robertson - Magenta Systems Ltd
 With a sniffer I can see that all 8  messages are coming from the
 remote device, but twsocket misses some.

Sockets send a stream of data, which is error corrected to ensure nothing
is corrupted or missing.  

If you are missing bits of that stream, the error must be in the way you
removing data from the received stream, in the SocketDataAvailable event
using ReceiveFrom or Receive.  

I've got applications sending data to each other each second for weeks at
a time, with no lost data. 

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


Re: [twsocket] UDP and TCP on same socket - problem on WS2008 and W7

2012-07-20 Thread Angus Robertson - Magenta Systems Ltd
 On starting on either a Windows Server 2008 R2 Standard or Windows 
 7 machine, it comes up with an error message: Address not available 
 (#10049 in setsockopt(IP_ADD_MEMBERSHIP)).

MSDN says: 

IP_ADD_MEMBERSHIP - WSAEADDRNOTAVAIL -  Do not call IP_ADD_MEMBERSHIP with
the same group more than once on the same network interface.

so maybe you can not multicast on UDP and TCP at the same time on the
same IP.

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


Re: [twsocket] Ping doesn�t work for 64 bit

2012-07-18 Thread Angus Robertson - Magenta Systems Ltd
 Hello, I wonder if there is any solution to the Ping component, it 
 is not working under Win64.
 I´m getting the error: _General Failure_, compiled with Delphi XE2 
 (icsv8w-140712) under Win 7 64bit.

I have reproduced your ping problem on Win7 64-bit.  Looking at MSDN, it
appears a slightly different IP_OPTION_INFORMATION and ICMP_ECHO_REPLY
structures are used for IcmpSendEcho function on 64-bit platforms, so
icmp.pas needs updating.  

Also note we are using icmp.dll which since Windows XP has been a stub
calling the real DLL for iphlpapi.dll, so that really needs changing as
well.  We can then support IPv6 ping as well, which needs adding.  

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


Re: [twsocket] ICS FTP Client - Next question

2012-07-17 Thread Angus Robertson - Magenta Systems Ltd
 The problem is that for every carriage return I get an additional
 non-Unicode carriage return.
 The ICS FTP Client component has the Binary property set TRUE.

But are you calling the TypeBinary or TypeSet methods that actually send
the TYPE command?  

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


Re: [twsocket] ICS FTP Client - Next question

2012-07-17 Thread Angus Robertson - Magenta Systems Ltd
 I have found that if I call TypeBinaryAsync first
 and then in the Request event (ftpTypeSetAsync) I now call GetAsync 

You only need to set type once, and if you are using Async events then
OnRequestDone is where you check your state mechanism for the next
command.  Personally, I mostly use the sync methods, much easier. 

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


Re: [twsocket] ICS FTP Client

2012-07-16 Thread Angus Robertson - Magenta Systems Ltd
 Now I change the working directory to Test1/abc. I check with 
 Now I change the working directory to Test1/abc. PwdAsync that
 it is correct and it responds with what I could expect.
 Next I try and do a directory listing on this folder. The response 
 indicates no error, but the stream is of zero size.

LIST only returns file in the current directory, so unless there are
files in Test1/abc it will return a blank directory. 

If you want to list all files in sub-directories you have to traverse the
directory free listing each directory and combine all the results, or use
an FTP that lists all sub-directories in a single command, ie the ICS FTP
server.  

You can try my File Transfer Components which are high level FTP and HTTP
components using ICS that will list sub-directories and copy all the
files with a single command. 

http://www.magsys.co.uk/delphi/magxfer.asp

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


  1   2   3   4   5   6   7   8   >