Re: [fpc-pascal] Re: Odyssey: SSockets and Threads.

2013-04-26 Thread Michael Van Canneyt
On Thu, 25 Apr 2013, silvioprog wrote: 2013/4/25 Michael Van Canneyt mich...@freepascal.org [...] Well, ssockets is very low level. fpselect() is mostly useful when you combine multiple file descriptors at once. Although it can be done, IMHO it makes little sense to create a select()

Re: [fpc-pascal] Re: Odyssey: SSockets and Threads.

2013-04-26 Thread Ludo Brands
On 04/26/2013 08:58 AM, Michael Van Canneyt wrote: On Thu, 25 Apr 2013, silvioprog wrote: I do not know where it would be used, it's just an observation hehe... Yes, but the above is what I mean with 'it does not make much sense'. I can easily add this - in fact I will do so, but

Re: [fpc-pascal] Re: Odyssey: SSockets and Threads.

2013-04-26 Thread Michael Van Canneyt
On Fri, 26 Apr 2013, Ludo Brands wrote: On 04/26/2013 08:58 AM, Michael Van Canneyt wrote: On Thu, 25 Apr 2013, silvioprog wrote: I do not know where it would be used, it's just an observation hehe... Yes, but the above is what I mean with 'it does not make much sense'. I can easily

Re: [fpc-pascal] Re: Odyssey: SSockets and Threads.

2013-04-26 Thread Marco van de Voort
In our previous episode, Michael Van Canneyt said: when the socket buffer is not empty. Note that select also returns when an exception occurs. I am aware of all this. My only 'objection' is that waitfordata() will operate on a single socket only. Good for single client, bad for

Re: [fpc-pascal] Re: Odyssey: SSockets and Threads.

2013-04-26 Thread Ludo Brands
On 04/26/2013 09:19 AM, Michael Van Canneyt wrote: On Fri, 26 Apr 2013, Ludo Brands wrote: On 04/26/2013 08:58 AM, Michael Van Canneyt wrote: On Thu, 25 Apr 2013, silvioprog wrote: I do not know where it would be used, it's just an observation hehe... Yes, but the above is what I

Re: [fpc-pascal] Re: Odyssey: SSockets and Threads.

2013-04-26 Thread Michael Van Canneyt
On Fri, 26 Apr 2013, Marco van de Voort wrote: In our previous episode, Michael Van Canneyt said: when the socket buffer is not empty. Note that select also returns when an exception occurs. I am aware of all this. My only 'objection' is that waitfordata() will operate on a single socket

Re: [fpc-pascal] Statically link library

2013-04-26 Thread Darius Blaszyk
On Apr 26, 2013, at 1:37 AM, Paul Breneman wrote: Yes it does find them, the statically libraries are linked into an executable which works fine. That is why I was surprised. I'm sure MinGW must link to other libraries as well. The question though is which. Anyway to find out for a

Re: [fpc-pascal] Re: Odyssey: SSockets and Threads.

2013-04-26 Thread Marco van de Voort
In our previous episode, Michael Van Canneyt said: I am aware of all this. My only 'objection' is that waitfordata() will operate on a single socket only. Good for single client, bad for server. How many open sockets must you have to qualify as a server? Well, you can't get more

Re: [fpc-pascal] Statically link library

2013-04-26 Thread Ludo Brands
On 04/26/2013 09:54 AM, Darius Blaszyk wrote: On Apr 26, 2013, at 1:37 AM, Paul Breneman wrote: Yes it does find them, the statically libraries are linked into an executable which works fine. That is why I was surprised. I'm sure MinGW must link to other libraries as well. The question

Re: [fpc-pascal] Statically link library

2013-04-26 Thread Ludo Brands
On 04/26/2013 10:19 AM, Ludo Brands wrote: Pass -M or --print-map to ld to get a memory map. It includes all object files included. On my system it shows that open and close are from MinGW32/lib/libmoldname.a and a undefined reference to `filesize' Ludo

Re: [fpc-pascal] Re: Odyssey: SSockets and Threads.

2013-04-26 Thread silvioprog
2013/4/26 Ludo Brands ludo.bra...@free.fr On 04/26/2013 08:58 AM, Michael Van Canneyt wrote: On Thu, 25 Apr 2013, silvioprog wrote: I do not know where it would be used, it's just an observation hehe... Yes, but the above is what I mean with 'it does not make much sense'. I can

Re: [fpc-pascal] Re: Odyssey: SSockets and Threads.

2013-04-26 Thread silvioprog
2013/4/26 Michael Schnell mschn...@lumino.de On 04/25/2013 06:15 PM, silvioprog wrote: Yes, OnDisconnect, it works exactly as you explained. But I also have the OnError event, which is useful when the client is terminated by an error (eg. killing the client via Ctrl+Alt+Del). :) It might

Re: [fpc-pascal] Re: Odyssey: SSockets and Threads.

2013-04-26 Thread silvioprog
2013/4/26 Ludo Brands ludo.bra...@free.fr On 04/26/2013 09:19 AM, Michael Van Canneyt wrote: On Fri, 26 Apr 2013, Ludo Brands wrote: On 04/26/2013 08:58 AM, Michael Van Canneyt wrote: On Thu, 25 Apr 2013, silvioprog wrote: I do not know where it would be used, it's just an

Re: [fpc-pascal] Re: Odyssey: SSockets and Threads.

2013-04-26 Thread Ludo Brands
On 04/26/2013 07:06 PM, silvioprog wrote: Ludo, a small question So, In loop of my thread, to the process doesn't stay blocked in recv, I need to use select in client too? If your socket is in blocking mode and you don't want your thread to block, yes. Server or client, there is no

Re: [fpc-pascal] Re: Odyssey: SSockets and Threads.

2013-04-26 Thread silvioprog
Select in socket of Delphi 2007 (a friend sent it to me: http://www.sendspace.com/file/06ev02): function TBaseSocket.Select(ReadReady, WriteReady, ExceptFlag: PBoolean; TimeOut: Integer): Boolean; var ReadFds: TFDset; ReadFdsptr: PFDset; WriteFds: TFDset; WriteFdsptr: PFDset; ExceptFds:

[fpc-pascal] FPC_JVM compilation fails on trunk

2013-04-26 Thread Torsten Bonde Christiansen
Hi List. I'm trying to follow this guide: http://wiki.freepascal.org/FPC_JVM/Building But when i reach the point where i do the actual compilation fail with the following output: torsten@epidata:~/FreePascal/fpc-trunk$ make all crossinstall CROSSOPT=-O2 -g CPU_TARGET=jvm OS_TARGET=android

Re: [fpc-pascal] FPC_JVM compilation fails on trunk

2013-04-26 Thread Jonas Maebe
On 26 Apr 2013, at 22:37, Torsten Bonde Christiansen wrote: I'm trying to follow this guide: http://wiki.freepascal.org/FPC_JVM/Building But when i reach the point where i do the actual compilation fail with the following output: torsten@epidata:~/FreePascal/fpc-trunk$ make all

Re: [fpc-pascal] FPC_JVM compilation fails on trunk

2013-04-26 Thread Torsten Bonde Christiansen
On 2013-04-26 22:53, Jonas Maebe wrote: On 26 Apr 2013, at 22:37, Torsten Bonde Christiansen wrote: I'm trying to follow this guide:http://wiki.freepascal.org/FPC_JVM/Building But when i reach the point where i do the actual compilation fail with the following output:

Re: [fpc-pascal] FPC_JVM compilation fails on trunk

2013-04-26 Thread Jonas Maebe
On 26 Apr 2013, at 23:38, Torsten Bonde Christiansen wrote: On 2013-04-26 22:53, Jonas Maebe wrote: On 26 Apr 2013, at 22:37, Torsten Bonde Christiansen wrote: I'm trying to follow this guide:http://wiki.freepascal.org/FPC_JVM/Building But when i reach the point where i do the actual