Re: socket.e was changed

new topic     » goto parent     » topic index » view thread      » older message » newer message

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 thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu