1. socket.e was changed


function select() was changed significantly in v4b3 from v4b2, and the demo code distributed with v4b3 was not changed to use it.

Specifically:
chat_server.ex
chat_client.ex

I downloaded v4b3 under an hour ago, those were the first two files i tested, both failed, then i stopped and reverted back to v4b2.
useless

new topic     » topic index » view message » categorize

2. Re: socket.e was changed

useless said...


function select() was changed significantly in v4b3 from v4b2, and the demo code distributed with v4b3 was not changed to use it.

Specifically:
chat_server.ex
chat_client.ex

I downloaded v4b3 under an hour ago, those were the first two files i tested, both failed, then i stopped and reverted back to v4b2.

Thanks for the report. I've created ticket:177.

Matt

new topic     » goto parent     » topic index » view message » categorize

3. Re: socket.e was changed

I ran into this issue the other day. I changed line 48 of chat_server.exw

from: object sock_data = sock:select({ server } & clients, 0)

to: object sock_data = sock:select({ server } & clients, {},{},0,0)

I also made this same change on line 62 of chat_client.exw. I didn't have any problems with the demo after that!

-Ira

new topic     » goto parent     » topic index » view message » categorize

4. Re: socket.e was changed

Jerome said...

I ran into this issue the other day. I changed line 48 of chat_server.exw

from: object sock_data = sock:select({ server } & clients, 0)

to: object sock_data = sock:select({ server } & clients, {},{},0,0)

I also made this same change on line 62 of chat_client.exw. I didn't have any problems with the demo after that!

-Ira


You made no other changes?

When i made that change to the server, it said it couldn't bind to the address, gave an error zero and aborted, using v4b3.

Changing it back to the original select() line, it ran fine on v4b2, and accepted 2 connections and operated properly.

useless

new topic     » goto parent     » topic index » view message » categorize

5. Re: socket.e was changed

I am running v4b3 on Ubuntu and here is the difference between my chat_server.ex and the original from installation.

diff chat_server.ex chat_server.backup

48c48
< object sock_data = sock:select({ server } & clients, {},{},0,0)
-
> object sock_data = sock:select({ server } & clients, 0)

Also, for chat_client.ex...

diff chat_client.ex chat_client.backup

62c62
< object sock_data = slib:select(sock, {},{},0,0)
-
> object sock_data = slib:select(sock, 0)

I can run "eui chat_server.ex" and it waits for connections on "0.0.0.0:5000" or running "eui chat_server.ex 10.128.81.17:5000" waits for connections on my ip address.

I was simply looking for a quick fix and this did the trick for me, there probably is a better solution!

I hope this helps,
Ira

P.S. For the chat_client.ex to connect to something other than the loopback address, I just made this change...
33c33
< if slib:connect(sock, addr ) != slib:OK then
-
> if slib:connect(sock, "127.0.0.1:5000") != slib:OK then

new topic     » goto parent     » topic index » view message » categorize

6. Re: socket.e was changed

Rev 3336 seems to be working just fine in Windows 7.

new topic     » goto parent     » topic index » view message » categorize

7. Re: socket.e was changed

euphoric said...

Rev 3336 seems to be working just fine in Windows 7.

SVN log shows that ne1uno fixed this back in March. See this commit:

r3120 | ne1uno | 2010-03-18 01:22:46 -0400

This might have been a post-beta3 fix.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu