Page 10 of 28
Re: HMGSCRIPT 2012: Programming For The Web in The Right Way
Posted: Mon Jun 04, 2012 11:57 pm
by jparada
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
Re: HMGSCRIPT 2012: Programming For The Web in The Right Way
Posted: Tue Jun 05, 2012 1:29 am
by Roberto Lopez
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
La última versión ya no lo necesita.
Re: HMGSCRIPT 2012: Programming For The Web in The Right Way
Posted: Wed Jun 06, 2012 11:14 am
by luisfrancisco62
los felicito por tan grandioso experimento me gustaria saber mas y obtener mas codigo, como se haria con bases de datos?
gracias muchas gracias
Re: HMGSCRIPT 2012: Programming For The Web in The Right Way
Posted: Wed Jun 06, 2012 12:19 pm
by Roberto Lopez
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:
Code: Select all
oClient:SendData( Chr( 129 ) + Chr( Len( cAnswer ) ) + hb_StrToUtf8( cAnswer ) )
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'm getting the message "file://Error during WebSocket handshake: 'Sec-WebSocket-Origin' header is missing".
It could no appear as a serious problem, but considering that iPads and iPhones uses it, we are in trouble
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.
Re: HMGSCRIPT 2012: Programming For The Web in The Right Way
Posted: Wed Jun 06, 2012 12:21 pm
by Roberto Lopez
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
No hay ejemplos con bases de datos todavía, pero sería muy simple hacerlo modificando los demos actuales.
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.
Re: HMGSCRIPT 2012: Programming For The Web in The Right Way
Posted: Wed Jun 06, 2012 5:20 pm
by Rathinagiri
I also see that many HTML5 input data types are not implemented in FireFox or Opera. But they are implemented in Chrome.
Re: HMGSCRIPT 2012: Programming For The Web in The Right Way
Posted: Wed Jun 06, 2012 6:36 pm
by Roberto Lopez
rathinagiri wrote:I also see that many HTML5 input data types are not implemented in FireFox or Opera. But they are implemented in Chrome.
Yes. The most notable is date on Chrome that not displays a calendar.
Re: HMGSCRIPT 2012: Programming For The Web in The Right Way
Posted: Wed Jun 06, 2012 10:57 pm
by IMATECH
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/
Re: HMGSCRIPT 2012: Programming For The Web in The Right Way
Posted: Thu Jun 07, 2012 12:54 am
by danielmaximiliano
here you can test if your browser support websocket: Real-Time Web test – Does HTML5 WebSockets work for you?
http://websocketstest.com/
Ronaldo : obrigado pela informação, meu teste passo firefox
Re: HMGSCRIPT 2012: Programming For The Web in The Right Way
Posted: Thu Jun 07, 2012 2:04 am
by Roberto Lopez
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.