Re: [twsocket] SessionClosed and close/shutdown

2008-08-17 Thread Arno Garrels
JLIST wrote:
 Hello Francois and Arno for the replies.
 
 I read online that on Unix, close() reduce a ref count for
 a socket. The last close() will call shutdown() automatically.
 I'm not sure if the same is true on Windows but I would think
 so because it makes sense and the whole TCP/IP thing starts on
 Unix platforms.

Even though TWSocket.Close also calls ShutDown(1) it actually
does not perform a bidirectional gracefull shutdown, since the 
socket handle may be closed too early. In order to initiate a 
gracefull shutdown after the last byte has been sent call 
shutdown(1) from event OnDataSent. 
For example, SendStr('bye bye') followed by a call to close() 
does not ensure the string is received at the peer. 

--
Arno Garrels

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


Re: [twsocket] Porting ICS MidWare to Delphi 2009

2008-08-17 Thread Maurizio Lotauro
Scrive Francois Piette [EMAIL PROTECTED]:

 Hi Guys !

Hi Francois!

[...]

 Converting ICS  MidWare was to too much difficult.

[...]

What you described is more or less what I expected with that kind of changes in
the compiler. I expected similar problems with the introduction of 64 bit.

 The question remains open to have properties exposed
 as String or AnsiString, or a mix of both.

Good question. Probably it is better to use the String type in general and the
AnsiString when absolute sure that it is enough. What is the approach of the 
VCL?

About the difficult, this new version is backward compatible? If yes, the
backward compatibility has introduced another level of difficulty in the port?


Bye, Maurizio.


This mail has been sent using Alpikom webmail system
http://www.alpikom.it

-- 
To unsubscribe or change your 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] Porting ICS MidWare to Delphi 2009

2008-08-17 Thread Francois PIETTE
 The question remains open to have properties exposed
 as String or AnsiString, or a mix of both.

 Good question. Probably it is better to use the String type in general
  and the AnsiString when absolute sure that it is enough.

Currently, with Arno and Angus, we selected to use mostly String (reverting 
back from the first work we've done).

 What is the approach of the VCL?

Only string.

 About the difficult, this new version is backward compatible? If yes, the
 backward compatibility has introduced another level of difficulty in the 
 port?

Projects cannot be opened with previous version and unfortunately they have 
not changed the extension. But a backup copy of an old project is created 
when you load it.

The language itself is largely compatible with previous versions. I have 
ported a mid-size real D2007 application using Midware and ICS with almost 
no change !

--
[EMAIL PROTECTED]
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

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


Re: [twsocket] Porting ICS MidWare to Delphi 2009

2008-08-17 Thread Arno Garrels
Maurizio Lotauro wrote:
 
 What you described is more or less what I expected with that kind of
 changes in the compiler. I expected similar problems with the
 introduction of 64 bit.

CG did a rather good job to make conversion of existing applications to
Unicode as easy as possible. Beside the fact that the default string type
now maps to an UTF-16 Unicode string both String and AnsiString are 
assignment compatible, the RTL converts the strings as needed. Though
this is a strong feature it also means that any code that used strings 
as binary buffer, or assumed 1 byte = 1 char did no longer work :(
And ICS assumed that rather frequently ;-) 

On the other side having a Unicode aware VCL and RTL will make it much 
easier to add charset conversion features and other real Unicode support
to ICS. BTW: The SMTP client, compiled with Delphi 2009, can now send 
messages encoded in any Ansi code page including UTF-8 just by setting 
property CharSet to a MIME charset that maps to a Windows code page 
available in the system. From UTF-16 it's easy and unexpensive to 
convert to the charset you like :)

--
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html



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