Re: [twsocket] Possible CliId duplication

2011-05-25 Thread Maurizio Lotauro
Scrive Arno Garrels arno.garr...@gmx.de:

 Maurizio Lotauro wrote:
  Scrive Arno Garrels arno.garr...@gmx.de:

[...]

  Cardinal and Integer should not change since (IIRC) NativeInt and
  NativeUInt was introduced to handle 32/64 bit cpu.
 
 That's correct Integer will remain 32 bit in x64 however might change
 in the far future and Longint most likely never changes its size even 
 in x128.

I don't think that this will happen, otherwise the introduction of NativeIn and 
NativeUInt make no sense. Now this two should follow the cpu and OS size.

These are two interested blog from Marco Cantu:

http://blog.marcocantu.com/blog/Delphi_64_bit_sneak_preview.html
http://blog.marcocantu.com/blog/getting_ready_delphi_64.html

Notice the changes for Windows messages too.

[...]

  And why don't invert the test?
  
  if FClientNum)  MaxLongint then
 Inc(FClientNum)
  else
 FClientNum := 1;
 
 I don't know why there is/was the = comparison, I guess that Angus
 wanted to build-in some kind of strange fault-tolerance? However provided
 that FClientNum is only ever incremented in
 TCustomWSocketServer.TriggerSessionAvailable
 (which it realy should) you are perfectly right here as well.

Another think that I noticed. Since the TWSocketClient.CliId is very imprtant 
to correct handle the client, why it is writable?


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] Possible CliId duplication

2011-05-25 Thread Arno Garrels
Maurizio Lotauro wrote:
 Scrive Arno Garrels arno.garr...@gmx.de:
 
 Maurizio Lotauro wrote:
 Scrive Arno Garrels arno.garr...@gmx.de:
 
 [...]
 
 Cardinal and Integer should not change since (IIRC) NativeInt and
 NativeUInt was introduced to handle 32/64 bit cpu.
 
 That's correct Integer will remain 32 bit in x64 however might change
 in the far future and Longint most likely never changes its size even
 in x128.
 
 I don't think that this will happen, 

So I do. 

 otherwise the introduction of
 NativeIn and NativeUInt make no sense. Now this two should follow the
 cpu and OS size. 

These types will always have the size of a Pointer.

 
 These are two interested blog from Marco Cantu:
 
 http://blog.marcocantu.com/blog/Delphi_64_bit_sneak_preview.html
 http://blog.marcocantu.com/blog/getting_ready_delphi_64.html
 
 Notice the changes for Windows messages too.

There hasn't much changed, WPARAM and LPARAM will be Pointer-sized 
integers, Int64 in Win64 and Longint in Win32, so sending Pointers
with messages is just a matter of casting them properly, i.e. 
WParam(MyPointer) etc.. BTW: ICS should be already well prepared 
for Win64. 

 
 [...]
 
 And why don't invert the test?
 
 if FClientNum)  MaxLongint then
Inc(FClientNum)
 else
FClientNum := 1;
 
 I don't know why there is/was the = comparison, I guess that Angus
 wanted to build-in some kind of strange fault-tolerance? However
 provided that FClientNum is only ever incremented in
 TCustomWSocketServer.TriggerSessionAvailable
 (which it realy should) you are perfectly right here as well.
 
 Another think that I noticed. Since the TWSocketClient.CliId is very
 imprtant to correct handle the client, why it is writable?

Good question, IMO it should be a read-only property.

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


[twsocket] Multicast question

2011-05-25 Thread Éric Fleming Bonilha
Hi

I´m wondering how to use ICS properly to send and receive Multicast data. Where 
can I find example for multicast and ICS?

I´m in doubt about the IGMP protocol, do I need to implement anything on 
application layer or does IGMP protocol is implemented on underlying stack 
automatically?

How my application will create a multicast group on network and/or join a group?

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