Jump to content


Photo

Gamemaker Websocket


  • Please log in to reply
120 replies to this topic

#51 Maxinston

Maxinston

    Epic Phail

  • GMC Member
  • 1248 posts
  • Version:Unknown

Posted 25 February 2012 - 03:04 PM

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

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.
  • 0
<div align='center'><img src="http://img33.imagesh...igpic88821.jpg" border="0" class="linked-sig-image" />
A designer knows that he achieved perfection not when there is nothing left to add but when there is nothing left to take away.</div>

#52 Maxinston

Maxinston

    Epic Phail

  • GMC Member
  • 1248 posts
  • Version:Unknown

Posted 26 February 2012 - 12:48 PM

EDIT: NVM got it using teh source thx everyone :D

Edited by pepolshet, 26 February 2012 - 01:04 PM.

  • 0
<div align='center'><img src="http://img33.imagesh...igpic88821.jpg" border="0" class="linked-sig-image" />
A designer knows that he achieved perfection not when there is nothing left to add but when there is nothing left to take away.</div>

#53 Maxinston

Maxinston

    Epic Phail

  • GMC Member
  • 1248 posts
  • Version:Unknown

Posted 02 March 2012 - 01:10 PM

This doesn't seem to work neither in my programs or the example :turned:

send [-1] = {15}

Edited by pepolshet, 02 March 2012 - 01:13 PM.

  • 0
<div align='center'><img src="http://img33.imagesh...igpic88821.jpg" border="0" class="linked-sig-image" />
A designer knows that he achieved perfection not when there is nothing left to add but when there is nothing left to take away.</div>

#54 Maxinston

Maxinston

    Epic Phail

  • GMC Member
  • 1248 posts
  • Version:Unknown

Posted 09 March 2012 - 05:36 PM

This doesn't seem to work neither in my programs or the example :turned:

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?
  • 0
<div align='center'><img src="http://img33.imagesh...igpic88821.jpg" border="0" class="linked-sig-image" />
A designer knows that he achieved perfection not when there is nothing left to add but when there is nothing left to take away.</div>

#55 thedyingdragon

thedyingdragon

    GMC Member

  • GMC Member
  • 23 posts

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
  • 0

Main Projects: Writing a C++ game engine with SFML API, Custom C++ MySQL API, The Dying Dragon
 


#56 Maxinston

Maxinston

    Epic Phail

  • GMC Member
  • 1248 posts
  • Version:Unknown

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.
  • 0
<div align='center'><img src="http://img33.imagesh...igpic88821.jpg" border="0" class="linked-sig-image" />
A designer knows that he achieved perfection not when there is nothing left to add but when there is nothing left to take away.</div>

#57 Maxinston

Maxinston

    Epic Phail

  • GMC Member
  • 1248 posts
  • Version:Unknown

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
  • 0
<div align='center'><img src="http://img33.imagesh...igpic88821.jpg" border="0" class="linked-sig-image" />
A designer knows that he achieved perfection not when there is nothing left to add but when there is nothing left to take away.</div>

#58 Manuel777

Manuel777

    InvaderGames

  • GMC Member
  • 3554 posts
  • Version:GM:Studio

Posted 19 March 2012 - 09:08 PM

Wicked, tagged for later :)
  • 0

#59 Debels

Debels

    GMC Member

  • GMC Member
  • 2869 posts
  • Version:GM:Studio

Posted 19 March 2012 - 09:54 PM

Finally found a use for this extension :)

Coming Soon The Gaming Central!

If you don't know what a Gaming Central is click spoiler:

Spoiler

  • 0

This signature has been removed for being too awesome.


#60 Crhonos

Crhonos

    GMC Member

  • GMC Member
  • 235 posts
  • Version:GM:Studio

Posted 25 April 2012 - 09:22 PM

Is Demion still working in this project ?

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

#61 eCNO

eCNO

    GMC Member

  • New Member
  • 1 posts
  • Version:GM:HTML5

Posted 24 May 2012 - 04:44 PM

Beyond "Quick Testing", has anybody actually gotten this to work with decent functionality? Using gmws I am able to connect to my 39dll server without problem but when I run the command: gmws_get_state() on my client it simply hangs. It will not return any state 0,1,2 or 3.

I am also unable to read packets sent from the gmws client. My server receives them but when it tries to read the packet it appears to be incompatible... Somehow.

[EDIT]
After further testing it seems my server only received a packet when the client "connected" to it. Afterwards, when I try to send a packet I receive "-1" meaning that it didn't work as the status appears disconnected/not connected yet. Aside from the initial connection packet, no packet is successfully sent to the server.

I thought this may be related to GM: Studio (as I've noticed other compatibility issues), but I rebuilt the client in GM: HTML 5 and I'm getting the same results...

[EDIT 2]
Finally got it working properly... It is rather headache inducing and unclear for those of us who aren't programmers but if you stick with it you'll be able to get it up and running. The most confusing part about it is setting up your ports properly and using "gmws.exe" effectively.

My number one advice: If you are getting a connection but aren't able to send packets properly, you aren't using gmws.exe properly. Make sure you are using two different ports (8080 & 8081). Being able to connect makes it difficult to solve the problem because it "feels like it's working", but it's not.

Good luck everyone!

Edited by eCNO, 24 May 2012 - 08:23 PM.

  • 0

#62 Noritox

Noritox

    GMC Member

  • GMC Member
  • 292 posts
  • Version:GM:Studio

Posted 14 July 2012 - 12:02 AM

When's the next update? :)
  • 0

:ph34r:  :ph34r:  :ph34r:


#63 waxbulletgames

waxbulletgames

    GMC Member

  • New Member
  • 25 posts

Posted 14 July 2012 - 10:28 PM

will this give me the ability to send a message to my computer from another computer on html? Like send a string.
  • 0
<If you think Barack Hussein Obama doesn't deserve to be the president put this in your signature>
GENERATION 27: The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.

#64 lukeescude

lukeescude

    GMC Member

  • GMC Member
  • 711 posts
  • Version:GM:Studio

Posted 14 July 2012 - 10:58 PM

It's a bridge between HTML5 web sockets and windows TCP sockets. So yes, if you know how to use it, it can do that.
  • 0
My 39dll Tutorial
GMechanism, a Game Maker extension for Online Highscores, Achievements, Chat Engine, INI Host, etc.
Posted Image

#65 Demion

Demion

    GMC Member

  • GMC Member
  • 46 posts

Posted 15 July 2012 - 08:57 AM

Hello. Its been a while when I last worked with this extension and game maker overall. I could make some updates if needed. Please report critical bugs and if needed I will try fix them. I am glad that some found this extension useful ;)

Edited by Demion, 15 July 2012 - 08:59 AM.

  • 0

#66 0000701333

0000701333

    GMC Member

  • GMC Member
  • 70 posts
  • Version:GM:Studio

Posted 29 July 2012 - 06:32 PM

I'm sure you already explained it somewhere, but could someone please explain to me how to set Parameters for the exe? I cannot figure it out, even with the help of google!

Edit:
P.s. So with the use of this, could I still make a game like an MMORPG? Or is this just used for simple things, like an online highscore system? Thanks for this extension as well! :laugh:

Edited by 0000701333, 29 July 2012 - 06:33 PM.

  • 0

#67 lukeescude

lukeescude

    GMC Member

  • GMC Member
  • 711 posts
  • Version:GM:Studio

Posted 29 July 2012 - 06:33 PM

ip1, port1, ip2, port 2

ip and port is for communication with the server itself, like 127.0.0.1, port 856

Ip and port 2 are what your server WOULD listen on for games to connect to, so like 127.0.0.1 port 857. (the port is what matters)

EDIT: It's made specifically for online sockets, so MMORPG is the ideal use. For online highscores, use GMechanism! :D </senseless advertising>

Edited by lukeescude, 29 July 2012 - 06:35 PM.

  • 0
My 39dll Tutorial
GMechanism, a Game Maker extension for Online Highscores, Achievements, Chat Engine, INI Host, etc.
Posted Image

#68 0000701333

0000701333

    GMC Member

  • GMC Member
  • 70 posts
  • Version:GM:Studio

Posted 29 July 2012 - 06:35 PM

Thanks! Except I got that part already, how to set them is what I cannot figure out! :unsure:
  • 0

#69 lukeescude

lukeescude

    GMC Member

  • GMC Member
  • 711 posts
  • Version:GM:Studio

Posted 29 July 2012 - 06:36 PM

Oh! it's in the launch parameters.

execute_shell("gmws.exe 127.0.0.1 ....")

Or from command line, manually.

Or from a BAT file, same syntax.

Edited by lukeescude, 29 July 2012 - 06:36 PM.

  • 0
My 39dll Tutorial
GMechanism, a Game Maker extension for Online Highscores, Achievements, Chat Engine, INI Host, etc.
Posted Image

#70 0000701333

0000701333

    GMC Member

  • GMC Member
  • 70 posts
  • Version:GM:Studio

Posted 29 July 2012 - 06:38 PM

Oh! Haha, I was trying to set them without launching the exe from within the game! That makes more sense now!

I am still curious though, so I get how this will be able to have the server receive messages, but will it be able to send them back to the client? If so, how? Just the normal way you would set up a server for an online game?
  • 0

#71 lukeescude

lukeescude

    GMC Member

  • GMC Member
  • 711 posts
  • Version:GM:Studio

Posted 29 July 2012 - 06:39 PM

Think of GMWS.exe as a tunnel, or a medium of communication. It supports 2-way communication, naturally, so messages can be sent/recvd by client and server.

GMWS.exe just provides a means of conversion between a Websocket and a Windows socket.

EDIT: websockets and windows sockets use different communication protocols, so GMWS is like a bridge between them.

Edited by lukeescude, 29 July 2012 - 06:40 PM.

  • 0
My 39dll Tutorial
GMechanism, a Game Maker extension for Online Highscores, Achievements, Chat Engine, INI Host, etc.
Posted Image

#72 0000701333

0000701333

    GMC Member

  • GMC Member
  • 70 posts
  • Version:GM:Studio

Posted 29 July 2012 - 06:42 PM

So if I were to have the server send a message, shall I send that message directly to the client in the same way a GM server does with the normal 39Dll and exe, or is it sent to the "bridge" in some way?
  • 0

#73 lukeescude

lukeescude

    GMC Member

  • GMC Member
  • 711 posts
  • Version:GM:Studio

Posted 29 July 2012 - 06:43 PM

Nope, just send it to the client like normal.

Since GMWS creates a virtual connection to the server for every client connected, the data will be relayed to the proper client just fine when you send the message.
  • 0
My 39dll Tutorial
GMechanism, a Game Maker extension for Online Highscores, Achievements, Chat Engine, INI Host, etc.
Posted Image

#74 0000701333

0000701333

    GMC Member

  • GMC Member
  • 70 posts
  • Version:GM:Studio

Posted 29 July 2012 - 06:45 PM

Thanks! Haha, you've answered all my question perfectly, I totally (mostly) get this now! :happy:

Now, as I believe Demion was saying, will this cause any security problems for the server host and/or clients?
  • 0

#75 lukeescude

lukeescude

    GMC Member

  • GMC Member
  • 711 posts
  • Version:GM:Studio

Posted 29 July 2012 - 06:48 PM

There are no more security risks than with a standard server-> client connection.

And you're welcome :) I've been doing online programming and network engineering since I was like 9 haha

Edited by lukeescude, 29 July 2012 - 06:48 PM.

  • 0
My 39dll Tutorial
GMechanism, a Game Maker extension for Online Highscores, Achievements, Chat Engine, INI Host, etc.
Posted Image

#76 0000701333

0000701333

    GMC Member

  • GMC Member
  • 70 posts
  • Version:GM:Studio

Posted 29 July 2012 - 06:52 PM

Many thanks, you have managed to help me yet again :)
  • 0

#77 Terrified Virus

Terrified Virus

    Moderators Plaything

  • GMC Member
  • 753 posts
  • Version:GM:Studio

Posted 29 July 2012 - 09:05 PM

This does seem interesting. I will have to give it a try.
  • 0

1357275755.png


#78 0000701333

0000701333

    GMC Member

  • GMC Member
  • 70 posts
  • Version:GM:Studio

Posted 29 July 2012 - 10:01 PM

Will this work with an encrypted buffer?

Edited by 0000701333, 29 July 2012 - 10:01 PM.

  • 0

#79 lukeescude

lukeescude

    GMC Member

  • GMC Member
  • 711 posts
  • Version:GM:Studio

Posted 29 July 2012 - 11:06 PM

You know, I have no clue. When you figure it out, post it up here!

EDIT: Actually I think that they should work. There's no reason for them not to.

Edited by lukeescude, 29 July 2012 - 11:18 PM.

  • 0
My 39dll Tutorial
GMechanism, a Game Maker extension for Online Highscores, Achievements, Chat Engine, INI Host, etc.
Posted Image

#80 0000701333

0000701333

    GMC Member

  • GMC Member
  • 70 posts
  • Version:GM:Studio

Posted 29 July 2012 - 11:43 PM

Haha! Well, the only reason I have any doubt (still have not yet gotten to the point to find out) is because if it can be encrypted and keeps hackers away, I see no reason why it can't be encrypted and keep a translating program away.... :unsure:
  • 0

#81 lukeescude

lukeescude

    GMC Member

  • GMC Member
  • 711 posts
  • Version:GM:Studio

Posted 29 July 2012 - 11:45 PM

Well the translating program just relays what it "hears". It doesn't care what the data contains, it's just gonna forward it (which is what it's supposed to do).

So, I think it's supported.
  • 0
My 39dll Tutorial
GMechanism, a Game Maker extension for Online Highscores, Achievements, Chat Engine, INI Host, etc.
Posted Image

#82 0000701333

0000701333

    GMC Member

  • GMC Member
  • 70 posts
  • Version:GM:Studio

Posted 29 July 2012 - 11:58 PM

Alright! Now, with all that said, I cannot find any form of encryption that comes with the extension.... Unlike the 39Dll, in which it comes built in... Any ideas?

(sorry for the endless barrage of questions! I thought I knew it all when it came to the 39Dll, but this just opens up a whole new field of questions!)
  • 0

#83 lukeescude

lukeescude

    GMC Member

  • GMC Member
  • 711 posts
  • Version:GM:Studio

Posted 29 July 2012 - 11:59 PM

Hahhaa no, if anyone knows it all about 39dll, it's ME!

XD jk

Sorta..

Anyways, you're using a 39dll extension? You can't assume an extension will have all the functions. The function you're wanting is bufferencrypt()
  • 0
My 39dll Tutorial
GMechanism, a Game Maker extension for Online Highscores, Achievements, Chat Engine, INI Host, etc.
Posted Image

#84 0000701333

0000701333

    GMC Member

  • GMC Member
  • 70 posts
  • Version:GM:Studio

Posted 30 July 2012 - 12:02 AM

(from the looks of it, you do know everything about 39Dll!)

I'm talking about this Javascript extension however... It does not have anyway of encrypting or decrypting, unlike the 39Dll does...

EDIT: If you read through all of the functions it has (which are shown on the first page), you can see it does not have any form of encrypting...

How much of a security threat would it be if I did not encrypt it?

Edited by 0000701333, 30 July 2012 - 12:03 AM.

  • 0

#85 lukeescude

lukeescude

    GMC Member

  • GMC Member
  • 711 posts
  • Version:GM:Studio

Posted 30 July 2012 - 12:03 AM

Ohhh no, you encrypt it with 39dll, and it remains encrypted through GMWS, and gets to the client encrypted. Like I said earlier, treat all communications like normal.
  • 0
My 39dll Tutorial
GMechanism, a Game Maker extension for Online Highscores, Achievements, Chat Engine, INI Host, etc.
Posted Image

#86 0000701333

0000701333

    GMC Member

  • GMC Member
  • 70 posts
  • Version:GM:Studio

Posted 30 July 2012 - 12:06 AM

I see, so I shall just use the gmws_ functions with it being encrypted and you believe it should work just fine?

Edit: If that would be the case....wouldn't you need to have a way to have it atleast know the decryption key? :ermm:

Edit 2: Oh my gosh.... I cannot shut it with the questions... Sorry about that.

Edited by 0000701333, 30 July 2012 - 12:07 AM.

  • 0

#87 lukeescude

lukeescude

    GMC Member

  • GMC Member
  • 711 posts
  • Version:GM:Studio

Posted 30 July 2012 - 12:07 AM

I think so. I can't really test it right now. Let me know how it goes. If it doesn't work properly, we'll tell the creator of GMWS to add encryption capability.
  • 0
My 39dll Tutorial
GMechanism, a Game Maker extension for Online Highscores, Achievements, Chat Engine, INI Host, etc.
Posted Image

#88 0000701333

0000701333

    GMC Member

  • GMC Member
  • 70 posts
  • Version:GM:Studio

Posted 30 July 2012 - 12:08 AM

Alright! Ill give it a go and test it out then.
  • 0

#89 0000701333

0000701333

    GMC Member

  • GMC Member
  • 70 posts
  • Version:GM:Studio

Posted 30 July 2012 - 04:54 PM

I might need some more help... :whistle:

So, with the old dll were you had to load every function, you could just do sendmessage(socket). After some trial and error though, I found that this extension only works with the 39dll.gex. This means I have to use the function 39dll_message_send, but then the arguments for that is more than just (socket), it asks for (socket, ip, port, bufferid). I know the socket, port, and bufferid, but what should I do for the ip? Should I send it to the clients ip, and if so, how?
  • 0

#90 Crhonos

Crhonos

    GMC Member

  • GMC Member
  • 235 posts
  • Version:GM:Studio

Posted 02 August 2012 - 04:50 PM

Anyone got this working ? Well i got it working in Demion test project, but when i implement this in my game gmws_recv does not work, gmws_get_state does not work, gm_ws connect seems to work but i m not sure. Anyone got this working, and have a project with it ?
  • 0

#91 Debels

Debels

    GMC Member

  • GMC Member
  • 2869 posts
  • Version:GM:Studio

Posted 02 August 2012 - 05:22 PM

Anyone got this working ? Well i got it working in Demion test project, but when i implement this in my game gmws_recv does not work, gmws_get_state does not work, gm_ws connect seems to work but i m not sure. Anyone got this working, and have a project with it ?


Well, as soon as i complete the 39dll part on my tutorial i would continue on Online Networking with Websocket using this tool :), but before when i used it it worked perfectly
  • 0

This signature has been removed for being too awesome.


#92 0000701333

0000701333

    GMC Member

  • GMC Member
  • 70 posts
  • Version:GM:Studio

Posted 02 August 2012 - 05:52 PM

It was confusing for me at first also, it is a little bit different. Ill post a "world engine" like version for you to use. Just give me sometime, since im leaving for vacation VERY SOON.
  • 0

#93 Demion

Demion

    GMC Member

  • GMC Member
  • 46 posts

Posted 02 August 2012 - 05:55 PM

About encryption. You can send encrypted data but you should decrypt it by yourself on client side (in gml or extension) because gmws have no implemented encryption algoritms. Anyway you should more think about your client-server communication architecture. If all data is checked on server (like can player move that far or shoot that fast) encryption doesnt really matters. Encryption only could help from "cheaters" who write their own client emulators (bots).

---


After some trial and error though, I found that this extension only works with the 39dll.gex.

Maybe dll and gex versions have some small differences in protocol. I dont remember very good this moment. Seems like I just used first 39dll extension I have found. :)

This means I have to use the function 39dll_message_send, but then the arguments for that is more than just (socket), it asks for (socket, ip, port, bufferid). I know the socket, port, and bufferid, but what should I do for the ip? Should I send it to the clients ip, and if so, how?

I guess its not client ip. Because many clients can connect from one ip address. I dont really remember. Better to read documentation provided or extensions sources (if available).

Edited by Demion, 02 August 2012 - 06:07 PM.

  • 0

#94 Debels

Debels

    GMC Member

  • GMC Member
  • 2869 posts
  • Version:GM:Studio

Posted 03 August 2012 - 05:52 AM

What browsers does GM Websocket works on?
  • 0

This signature has been removed for being too awesome.


#95 Demion

Demion

    GMC Member

  • GMC Member
  • 46 posts

Posted 03 August 2012 - 09:18 AM

From first post

Now works correctly only with chrome and firefox.


  • 0

#96 Debels

Debels

    GMC Member

  • GMC Member
  • 2869 posts
  • Version:GM:Studio

Posted 04 August 2012 - 06:18 AM

From first post


Now works correctly only with chrome and firefox.

Hmmm, Thanks.

BTW: I'm going to make this Website about: Online Programming with GM!, and i was planning on including GM Websocket to it, so How should i refer to you on the credits?
  • 0

This signature has been removed for being too awesome.


#97 Demion

Demion

    GMC Member

  • GMC Member
  • 46 posts

Posted 04 August 2012 - 10:16 AM

You can just post link to the forum thread on your website. By the way, unfortunately, this extension is not yet fully finished.
  • 0

#98 elgreen

elgreen

    GMC Member

  • GMC Member
  • 5 posts
  • Version:Unknown

Posted 04 August 2012 - 06:48 PM

Is it possible to work together with Faucet Networking?
  • 0

#99 Debels

Debels

    GMC Member

  • GMC Member
  • 2869 posts
  • Version:GM:Studio

Posted 04 August 2012 - 11:49 PM

Is it possible to work together with Faucet Networking?

I think not, since 39dll and Faucet Networking are different, so no xD

Note: But you can still try.

Edited by Debels, 04 August 2012 - 11:50 PM.

  • 0

This signature has been removed for being too awesome.


#100 elgreen

elgreen

    GMC Member

  • GMC Member
  • 5 posts
  • Version:Unknown

Posted 05 August 2012 - 04:58 PM

Firefox(14.0.1):
ReferenceError: MozWebSocket is not defined

In the browser chrome works fine, however the client (html5) does not receive packets from the server but the server (Faucet) receives packets from the client.

res = gmws_recv(ws);//res is always -1
double gmws_recv(double wsid); // return 0 if disconnect, return -1 if no data was received
I checked with the help of sniffer, gmws.exe always sends packets to the client

There is still a useful site to check websocket in the browser:
http://www.websocket.org/echo.html

Edited by elgreen, 05 August 2012 - 05:22 PM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users