GameMaker Websocket
#41
Posted 28 January 2012 - 09:59 PM
Is there a way for you to make the socket more efficient? Sometimes data will just build up, then the client will get a sudden burst of data spontaneously.
#42
Posted 29 January 2012 - 01:08 AM
Edited by Demion, 29 January 2012 - 01:27 AM.
#43
Posted 29 January 2012 - 05:54 AM
I've been porting my GMechanism API over to HTML5 using GMWS, so far it's going really well.
#44
Posted 29 January 2012 - 04:23 PM
while(gmws_get_state(server)!=1)
{
//empty space
}
But my server shows the HTML5 game connecting over and over again
#45
Posted 29 January 2012 - 09:04 PM
What you mean by "websocket are slow"? I think websockets are fast enough. I ll make some tests with "a sudden burst of data" and get_state function. I want to figure out issue cause - GameMaker arhitecture or JS Html5.function gmws_get_state(id)
{
if (!gmws_isWebsocket())
return -1;
return sockets[id].readyState;
}
Edited by Demion, 29 January 2012 - 09:04 PM.
#46
Posted 29 January 2012 - 11:44 PM
It's all good though, I think I'm going to stick to PHP to communicate with my server.
#47
Posted 30 January 2012 - 07:00 PM
Sorry for delay. Ill release "translator" gmws sources next release (+Opera support). I was very busy last week. I hope Ill release it this weekends.
Its the end of Jan now what happen to GMWS translator source code?
#48
Posted 04 February 2012 - 05:00 AM
As promised. Gmws (websocket protocol) c/cpp sources. They are not finished, not commented, not organised. Ill post it in 1st post when organise code better.
#49
Posted 09 February 2012 - 07:17 PM
gmws Sources
As promised. Gmws (websocket protocol) c/cpp sources. They are not finished, not commented, not organised. Ill post it in 1st post when organise code better.
Y i thank you very much good MR
I appreciate this very much
have a good day
Edited by oneSOB, 09 February 2012 - 07:18 PM.
#50
Posted 19 February 2012 - 04:36 PM
awsome , i'll start building a game on this extension right away
#51
Posted 25 February 2012 - 03:04 PM
I am trying to make my C# server accept the handshake, it seems that the server accepts the clients handshake but the client doesn't accept the server so the player exit event fires off in the server instantly after connection. Help appreciated.1 127.0.0.1:4967 127.0.0.1:8181 185 Recv
0000 47 45 54 20 2F 20 48 54 54 50 2F 31 2E 31 0D 0A GET / HTTP/1.1..
0010 55 70 67 72 61 64 65 3A 20 77 65 62 73 6F 63 6B Upgrade: websock
0020 65 74 0D 0A 43 6F 6E 6E 65 63 74 69 6F 6E 3A 20 et..Connection:
0030 55 70 67 72 61 64 65 0D 0A 48 6F 73 74 3A 20 31 Upgrade..Host: 1
0040 32 37 2E 30 2E 30 2E 31 3A 38 31 38 31 0D 0A 4F 27.0.0.1:8181..O
0050 72 69 67 69 6E 3A 20 68 74 74 70 3A 2F 2F 31 32 rigin: http://12
0060 37 2E 30 2E 30 2E 31 3A 35 31 32 36 38 0D 0A 53 7.0.0.1:51268..S
0070 65 63 2D 57 65 62 53 6F 63 6B 65 74 2D 4B 65 79 ec-WebSocket-Key
0080 3A 20 38 54 45 56 31 37 45 76 4E 54 47 6A 69 5A : 8TEV17EvNTGjiZ
0090 6B 51 68 6C 63 6E 42 77 3D 3D 0D 0A 53 65 63 2D kQhlcnBw==..Sec-
00A0 57 65 62 53 6F 63 6B 65 74 2D 56 65 72 73 69 6F WebSocket-Versio
00B0 6E 3A 20 31 33 0D 0A 0D 0A n: 13....
2 127.0.0.1:8181 127.0.0.1:4967 174 Send
0000 48 54 54 50 2F 31 2E 31 20 31 30 31 20 57 65 62 HTTP/1.1 101 Web
0010 20 53 6F 63 6B 65 74 20 50 72 6F 74 6F 63 6F 6C Socket Protocol
0020 20 48 61 6E 64 73 68 61 6B 65 0D 0A 55 70 67 72 Handshake..Upgr
0030 61 64 65 3A 20 57 65 62 53 6F 63 6B 65 74 0D 0A ade: WebSocket..
0040 43 6F 6E 6E 65 63 74 69 6F 6E 3A 20 55 70 67 72 Connection: Upgr
0050 61 64 65 0D 0A 57 65 62 53 6F 63 6B 65 74 2D 4F ade..WebSocket-O
0060 72 69 67 69 6E 3A 20 68 74 74 70 3A 2F 2F 6C 6F rigin: http://lo
0070 63 61 6C 68 6F 73 74 3A 38 30 38 30 0D 0A 57 65 calhost:8080..We
0080 62 53 6F 63 6B 65 74 2D 4C 6F 63 61 74 69 6F 6E bSocket-Location
0090 3A 20 77 73 3A 2F 2F 6C 6F 63 61 6C 68 6F 73 74 : ws://localhost
00A0 3A 38 31 38 31 2F 63 68 61 74 0D 0A 0D 0A :8181/chat....
GET / HTTP/1.1
Upgrade: websocket
Connection: Upgrade
Host: 127.0.0.1:8181
Origin: http://127.0.0.1:51268
Sec-WebSocket-Key: 8TEV17EvNTGjiZkQhlcnBw==
Sec-WebSocket-Version: 13
HTTP/1.1 101 WebSocket Protocol Handshake
Upgrade: WebSocket
Connection: Upgrade
WebSocket-Origin: http://localhost:8080
WebSocket-Location: ws://localhost:8181/chat
#52
Posted 26 February 2012 - 12:48 PM
Edited by pepolshet, 26 February 2012 - 01:04 PM.
#53
Posted 02 March 2012 - 01:10 PM
send [-1] = {15}
Edited by pepolshet, 02 March 2012 - 01:13 PM.
#54
Posted 09 March 2012 - 05:36 PM
This doesn't seem to work neither in my programs or the example
send [-1] = {15}
It seems that it takes 20-60 seconds for the first packets to arrive but since then every is flawless, does anyone else experience this?
#55
Posted 09 March 2012 - 05:47 PM
It seems that it takes 20-60 seconds for the first packets to arrive but since then every is flawless, does anyone else experience this?
I don't have this issue
Im using a C++ server and I test on my local machine and a remote machine(which is my actual server)
Both times it connects fine and recieves packets right away
#56
Posted 09 March 2012 - 07:24 PM
It seems that it takes 20-60 seconds for the first packets to arrive but since then every is flawless, does anyone else experience this?
I don't have this issue
Im using a C++ server and I test on my local machine and a remote machine(which is my actual server)
Both times it connects fine and recieves packets right away
It's kind of weird come to think of it, when I connect to my server a new player is created instantaneously yet when I try to send bytes it takes up to a minute for the first ones to arrive. If I disconnect the client in the middle and close the socket the server receives the bytes before the sixty second period.
#57
Posted 11 March 2012 - 02:16 PM
It seems that it takes 20-60 seconds for the first packets to arrive but since then every is flawless, does anyone else experience this?
I don't have this issue
Im using a C++ server and I test on my local machine and a remote machine(which is my actual server)
Both times it connects fine and recieves packets right away
After some testing I can see that GMWS never receives the bytes from the HTML5 app, they never even leave it.
Help appreciated
#58
Posted 19 March 2012 - 09:08 PM
#59
Posted 19 March 2012 - 09:54 PM
Coming Soon The Gaming Central!
If you don't know what a Gaming Central is click spoiler:
#60
Posted 25 April 2012 - 09:22 PM
Did anyone get this to work?
I am trying to make it work, but heres the thing, i have a 39dll c++ server running, that accepts normally gm8.1 clients(with 39dll) but when i try to use GMWS "translator" and gmws.gex i can't get things to work properly, my server receives the message of incoming client, but hte client does not receive the server answer.
Do i have to change my 39dll server so it will be compatible with gmws or i just have to get gmws translator working fine ?
--- Also i can't compile gmws source, i get an error saying that SHA1 get in the end of the line.--Got it compiled.
Help would be apreciated =D
Edited by Crhonos, 30 April 2012 - 12:29 AM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











