On 2012-06-11 18:04, Viktor Szakáts wrote:
> 2. Please add SVN ID and standard copyright headers to all files.
> README should be renamed to readme.txt KNOWN.ISSUES
> to issues.txt.
>
Not done. See remarks at bottom of this message.
> 3. All hbamf files should use 8.3 short names for
> DOS compatibility.
>
Files renamed, except JavaScript classes sitting in js/lib/amf/
> 4. I'd recommend running hbformat on all .prg files, otherwise
> I will have to do it as the resident cleanup guy. Same for C code,
> which needs uncrustify plus config/hb_c.cfg to format it
> Harbour stds.
>
Done.
> 5. For Harbour SVN,
bstr.ch is not needed.
>
Deleted this relationship.
> 6. CHR_AMF3_* macros use plain CHR(), should be hb_BChar(),
> it also needs self-inclusion guard.
>
Done.
> 7. hbref.c uses _HB_API_INTERNAL_, which is wrong for
> non-core code.
>
Done.
> 8. Also the code seems to be missing some
> {} enclosure or indentation is wrong.
>
> 9. Some or all sources use tabs. All should be replaced
> with 3 spaces.
>
Not anymore, i hope.
> 10. Some code uses<stdio.h> and<string.h>, f.e. C RTL
> file I/O. These should be replaced with hb_fs*() APIs.
>
> 11. C code doesn't cast hb_xgrab() values to proper type,
> so it won't build in C++ mode.
>
> 12. 'count' should be named s_count in amfio-stdio.c
> All static vars should have s_ prefix.
>
amfio-stdio.c which is now called amfstdio.c was rewritten a little to
follow these directions. Compiles everywhere, but tested by me only
while paired with Adobe AIR app on Windows.
> 13. I suggest copying .hbc and .hbp files from some
> existing Harbour contrib and modify it for hbamf. They
> need to be redone.
>
Still a TODO.
> 14. We've been talking about performance, but f.e. some
> code call hb_idleSleep( 0.05 ) which will be definitely
> slow things down, so I suggest other solution or releasing
> idle time only.
>
Deleted.
> 15. The lib still depends on hbxpp, maybe you don't use
> HB_ISFUNCTION() I just committed.
>
Done. Not dependant on any other library now.
> 1. I think you should separate WS from HBAMF. HBAMF
> should solely contain stuff to serialize/deserialize using
> AMF format. This would be pure .c code as I understand.
> +1. Next, there is the AMFWS functionality which should be
> separate project, f.e. hbwsamf, or simply hbws with AMF
> being one build-time or runtime option, with hbamf as
> a dependency.
Separated WS should have choosable serialization method, but i should
also work out a basic protocol which wraps it. While maintaning some
more standards now, I vote to not include the lib yet. For separating WS
i need some more spare time. I will keep informing about changes in this
project.
http://www.fki.pl/hb/hbamf.tar.gz
http://www.fki.pl/hb/hbamf.zip
Archives updated.
Overview of some changes not in included in checklist:
* amfdecode.c -> amfdec.c
* amfencode.c -> amfenc.c
* amfio-client.prg -> amfiocli.prg
* amfio-stub.prg -> amfiosrv.prg
* amfio-stdio.c -> amfstdio.c
* amfws-stub.prg -> amfwssrv.prg
* tests/test-client.prg -> examples/client.prg
* tests/test-server.prg -> examples/server.prg
* tests/test-wserver.prg -> examples/wsserver.prg
* js/test-wserver.htm -> js/test-ws.htm
* js/test-wserver.js -> js/test-ws.js
* KNOWN.ISSUES -> issues.txt
* README -> readme.txt
* amfwssrv.prg
* optimized XOR WebSocket unmasking with HB_StrXOR()
* amfiosrv.prg
! fixed recently introduced RTE while handling AMFIO_OBJECTNEW message
+ wsbin.c
* generic .c binary handling routines moved to separate file
*
amfio.ch ->
hbamf.ch
* js/test-ws.htm
* js/test-ws.js
* added random 48k echo string test
Best regards, Aleksander Czajczyński