HMGSCRIPT 2012: Programming For The Web in The Right Way :)
Moderator: Rathinagiri
Re: HMGSCRIPT 2012: Programming For The Web in The Right Way
Hola,
Para mi funcionó sin problemas, gracias al tip de Rathinagiri, copiar std.ch and set.ch al folder donde se encuentra wssocket.exe.
Gracias.
Saludos,
Javier
Para mi funcionó sin problemas, gracias al tip de Rathinagiri, copiar std.ch and set.ch al folder donde se encuentra wssocket.exe.
Gracias.
Saludos,
Javier
- Roberto Lopez
- HMG Founder
- Posts: 4023
- Joined: Wed Jul 30, 2008 6:43 pm
Re: HMGSCRIPT 2012: Programming For The Web in The Right Way
La última versión ya no lo necesita.jparada wrote:Hola,
Para mi funcionó sin problemas, gracias al tip de Rathinagiri, copiar std.ch and set.ch al folder donde se encuentra wssocket.exe.
Gracias.
Saludos,
Javier
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- luisfrancisco62
- Posts: 66
- Joined: Thu Mar 18, 2010 12:16 am
- Location: Colombia
- Contact:
Re: HMGSCRIPT 2012: Programming For The Web in The Right Way
los felicito por tan grandioso experimento me gustaria saber mas y obtener mas codigo, como se haria con bases de datos?
gracias muchas gracias
gracias muchas gracias
- Roberto Lopez
- HMG Founder
- Posts: 4023
- Joined: Wed Jul 30, 2008 6:43 pm
Re: HMGSCRIPT 2012: Programming For The Web in The Right Way
Hi All,
I', facing two problems with the server and I'm asking for help.
1. I've done a server function that retrieves a query in the form of an html table. The problem is that the browser claims that the message is too large.
Experimenting I've noticed that the maximum message length that works is 127 characters.
This is not a protocol limitation but a server limitation.
About line#260 in wssocket.prg you'll find the line that must be modified:
I've read protocol specification and I've attempted modified versions of this line, but it not worked.
2. We are unable to connect to the server from Safari.

I've tested on Safari for Windows, but I'm pretty sure that it will fail on OSX and IOS versions too, since probably they share the same code.
Any help on any of this problems is greatly welcome.
I', facing two problems with the server and I'm asking for help.
1. I've done a server function that retrieves a query in the form of an html table. The problem is that the browser claims that the message is too large.
Experimenting I've noticed that the maximum message length that works is 127 characters.
This is not a protocol limitation but a server limitation.
About line#260 in wssocket.prg you'll find the line that must be modified:
Code: Select all
oClient:SendData( Chr( 129 ) + Chr( Len( cAnswer ) ) + hb_StrToUtf8( cAnswer ) )2. We are unable to connect to the server from Safari.
It could no appear as a serious problem, but considering that iPads and iPhones uses it, we are in troubleI'm getting the message "file://Error during WebSocket handshake: 'Sec-WebSocket-Origin' header is missing".
I've tested on Safari for Windows, but I'm pretty sure that it will fail on OSX and IOS versions too, since probably they share the same code.
Any help on any of this problems is greatly welcome.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Roberto Lopez
- HMG Founder
- Posts: 4023
- Joined: Wed Jul 30, 2008 6:43 pm
Re: HMGSCRIPT 2012: Programming For The Web in The Right Way
No hay ejemplos con bases de datos todavía, pero sería muy simple hacerlo modificando los demos actuales.luisfrancisco62 wrote:los felicito por tan grandioso experimento me gustaria saber mas y obtener mas codigo, como se haria con bases de datos?
gracias muchas gracias
El único problema por resolver, es que la longitud de los mensajes del servidor hacia el cliente, no puede ser mayor de 127 caracteres. El server debe ser modificado para lograrlo.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Rathinagiri
- Posts: 5481
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: HMGSCRIPT 2012: Programming For The Web in The Right Way
I also see that many HTML5 input data types are not implemented in FireFox or Opera. But they are implemented in Chrome.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
- Roberto Lopez
- HMG Founder
- Posts: 4023
- Joined: Wed Jul 30, 2008 6:43 pm
Re: HMGSCRIPT 2012: Programming For The Web in The Right Way
Yes. The most notable is date on Chrome that not displays a calendar.rathinagiri wrote:I also see that many HTML5 input data types are not implemented in FireFox or Opera. But they are implemented in Chrome.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
Re: HMGSCRIPT 2012: Programming For The Web in The Right Way
Below another project with sockets (Maybe has something usefull)...
This Project is started at harbour developer group and made from Daniel Garcia Gil e Antonio Linares
You need a HTML5 WebSockets support capable Internet browser like Chrome. Unfortunately IE does not apply. IE is behind its competitors regarding HTML5 support. Thats why I use Chrome, and also because it is much faster. Microsoft has promised a new version with HTML5 support but it seems as it is not ready yet.
Internet Explorer 10 and Metro style apps using JavaScript add support for the WebSocket API as defined in the W3C's HTML5 specification on the WebSocket API, which is currently in the Working Draft stage.
http://code.google.com/p/harbour-websocket/

here you can test if your browser support websocket: Real-Time Web test – Does HTML5 WebSockets work for you?
http://websocketstest.com/
This Project is started at harbour developer group and made from Daniel Garcia Gil e Antonio Linares
You need a HTML5 WebSockets support capable Internet browser like Chrome. Unfortunately IE does not apply. IE is behind its competitors regarding HTML5 support. Thats why I use Chrome, and also because it is much faster. Microsoft has promised a new version with HTML5 support but it seems as it is not ready yet.
Internet Explorer 10 and Metro style apps using JavaScript add support for the WebSocket API as defined in the W3C's HTML5 specification on the WebSocket API, which is currently in the Working Draft stage.
http://code.google.com/p/harbour-websocket/
here you can test if your browser support websocket: Real-Time Web test – Does HTML5 WebSockets work for you?
http://websocketstest.com/
M., Ronaldo
By: IMATECH
Imation Tecnologia
By: IMATECH
Imation Tecnologia
- danielmaximiliano
- Posts: 2646
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: HMGSCRIPT 2012: Programming For The Web in The Right Way
Ronaldo : obrigado pela informação, meu teste passo firefox
here you can test if your browser support websocket: Real-Time Web test – Does HTML5 WebSockets work for you?
http://websocketstest.com/
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
- Roberto Lopez
- HMG Founder
- Posts: 4023
- Joined: Wed Jul 30, 2008 6:43 pm
Re: HMGSCRIPT 2012: Programming For The Web in The Right Way
Hi,
I've found information about data-framing in websockets. This information will allow us to change the server code to make it able to send messages larger than 126 bytes.
To implement it, I need to use the following operators:
- Bitwise AND (& in C)
- Bitwise OR (| in C)
- Bitwise right shift ( >> in C)
Does anybody knows if are these operators available in Harbour (or any Harbour contrib library)?
TIA.
I've found information about data-framing in websockets. This information will allow us to change the server code to make it able to send messages larger than 126 bytes.
To implement it, I need to use the following operators:
- Bitwise AND (& in C)
- Bitwise OR (| in C)
- Bitwise right shift ( >> in C)
Does anybody knows if are these operators available in Harbour (or any Harbour contrib library)?
TIA.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)