Closed cmdocmd closed 4 years ago
Hi, were you able to solve your issue? :)
not really still wondering why its not working
You can also try cloning this repo and then running cargo run --example server
and cargo run --example client
and see if those work. I'll try your adjustments locally as well.
Ok, so if all I do is change the listening IP address to Ipv4Addr::UNSPECIFIED
, the example server and client still continue to work fine.
Try cloning this repo and running both the example server and client with RUST_BACKTRACE=1
(have to set this as an environment variable) so we can see where exactly it crashes.
i tried to make cargo test got this error
and here when i enabled rust_backtace=1 https://pastebin.com/ZT4W94j8 and i didnt change anything from this repo just installed it made cargo build then cargo test
So it seems that enet_address_set_host()
in src/address.rs:29
seems to return an error. The ENet-function that is called there is this one: http://enet.bespin.org/group__Address.html#ga979aff1766944d841950c35b57705b49
This is really weird and seems to be some enet-internal problem. You can try changing the address it tries to bind to from "localhost"
to "127.0.0.1"
in the test (so in line 86 in address.rs
). That also works locally for me as well, don't really see what's going wrong here.
okay when i changed it to 127.0.0.1 and run cargo test it didnt show any error but when i tried to connect still doesn't receive any event
update: it is receiving packet from client now but is it possible to receive packet from a game ?
That's great to hear! Sorry I didn't reply for a while. Was there some error in this library that caused the problem? And what exactly do you mean by 'receiving a packet from a game'? Does the example client successfully send a packet to the server, which then prints a message?
everything is from this repo just changed the port and made it UNSPECIFIED instead of localhost