Can't get socket.io to connect to an address

Bugs will be moved here once resolved.

Post » Wed Jun 06, 2012 5:23 pm

Hi,

I just made a simple socket.io test game, and even though I've specified a valid address and port I can see that my Construct 2 game is trying to connect to "undefined" rather than "http://myaddress.com".

Is this something you're familiar with?

I'd post an example, but I can't due to the bug described here.

Thanks a lot guys.
B
22
S
5
Posts: 107
Reputation: 2,354

Post » Wed Jun 06, 2012 6:39 pm

We don't officially support socket.io. Can you tell me a bit more about what you are trying to do? Are you writing a third party plugin? What specifically do you think is the problem in C2?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Wed Jun 06, 2012 6:51 pm

SocketIO doesn't connect via http, try using a ip address instead.

I also think the default port is 8099 and not 80(http).

When you get the black screen of death fixed, post a capx.
Epic Space Online - Google it!
B
34
S
10
G
5
Posts: 165
Reputation: 6,637

Post » Wed Jun 06, 2012 8:49 pm

@bolosaur
You can't access socket.io functionality directly from Construct 2. So are you
a) using one of the existing thitd-party socket.io plugins, or
b) (as Ashley suggests) writing a socket.io plugin yourself?

And in that case why have you come to the conclusion that your connection failure is due to a C2 bug rather than a plugin bug?Velojet2012-06-06 20:50:28
B
105
S
20
G
12
Posts: 549
Reputation: 20,320

Post » Wed Jun 06, 2012 10:11 pm

@Ashley

I'm using the "Socket" plugin that comes with Construct 2. I'm trying to connect it to a node.js server I've got running with socket.io, and it resolves perfectly fine when I'm testing it through other means. When I'm using Construct 2's Socket plugin however, it doesn't seem to use the value I provide in the "Connect" function of the plugin, as whenever I test my game it just tries to connects to "http://undefined/socket.io/1/whatever" according to the Firebug console.

@Taurian

What do you mean it doens't connect via HTTP? Isn't that how WebSocket tries to establish a connection? Also, the default port doesn't matter as far as I know, because it's set to "80" on both ends.

@Velojet

I'm using the built-in "Socket" plugin. I'm also not claiming that it's a Construct 2 bug, but I assumed it could be posted here as the plugin is included with Construct 2, or maybe I'm wrong about that?
B
22
S
5
Posts: 107
Reputation: 2,354

Post » Wed Jun 06, 2012 10:59 pm



Post a .capx
Epic Space Online - Google it!
B
34
S
10
G
5
Posts: 165
Reputation: 6,637

Post » Thu Jun 07, 2012 12:40 am

@bolosaur - you must be mistaken. There is no official socket plugin for Construct 2. You must have found a third party one and unfortunately it's not our responsibility to fix third party code!
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Thu Jun 07, 2012 12:54 am

[QUOTE=bolosaur]I'm using the built-in "Socket" plugin. I'm also not claiming that it's a Construct 2 bug, but I assumed it could be posted here as the plugin is included with Construct 2, or maybe I'm wrong about that?[/QUOTE]
@bolosaur
I'm afraid you are wrong about that - sorry. As Ashley says there is no socket.io plugin included with Construct 2, so if there's a bug, it's not in C2 or its own component plugins.

Where did you get the socket.io plugin from?Velojet2012-06-07 04:09:23
B
105
S
20
G
12
Posts: 549
Reputation: 20,320

Post » Fri Jun 08, 2012 3:47 pm

Closing since it's a third party issue.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests