Przemyslaw Czerpak writes:
And, finally, and this is what, probably, will not be suitable for
others - I got rid of the HB_SOCKET_STRUCT and appropriate stuff, so the
sockets are directly passed as parameters and returned, assuming that
included in HB_SOCKET_STRUCT things may be moved to Harbour level, if
needed in specific application.
So you introduced very serious limitations for your own code.
Harder portability and you you will not be able to use other type
of connections when we will add them. HB_SOCKET_STRUCT should hide
platform and protocol differences.
I don't see limitations here. Server part is written mostly on
Harbour, at least those parts, which works with sockets - at Harbour
level there is no differense, what kind of data the socket is, the only
operation with it is pass it to appropriate socket function ( from
hbinet.c or any other ).
The C level socket API is used in client part, because the RDD is
written on C. I don't see serious problem here, too, because I'm sure
that in the case of necessity appropriate separated parts can be easily
adopted.
Can you give me any reason why you are not using PHB_ITEM pointers
but low level OS handles directly?
The main reason was that I cannot place my additional socket functions
not in hbinet.c, but in my source files without making
hb_inetSocketFinalize() public - I suppose that if it is static, there
are reasons for it.
The second is that I don't understand why hb_parptrGC(),
hb_inetSocketFinalize() are used instead of usual hb_parptr() and how to
work with them, I found it more easy for me to rewrite appropiate parts
of code than dig in it :).
I saw this thread and I thought that Mindaugas perfectly explain that
it's not necessary to touch socket internals at all and there is no
problem with hb_inetSocketFinalize() at all. You only need C level API
to access Harbour sockets and of course we should add it. It will be
very small modification so I can give it even today if it helps you.
It's very appreciated. And with hb_inetSocketFinalize() public :).
>> I've wrote basic part already, and few my applications works
perfectly
with it ( including such a big as Personnel and Salary accounting ).
Again, It's very nice news. And if you can updated your code to use
PHB_ITEM pointers as connection handles then I'll add Harbour public
socket API ASAP.
Almost nothing should be updated there. Just a type of socket variable
in the workarea structure and calls of it in a couple of functions.
Regards,
Alexander
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour