I decided to try to start learning how to do multiplayer stuff and at first made my own sockets and stuff. Then I got enet and I'm having problems with it. I can't get a client to connect to a server. Like if I send someone the client they aren't able to connect to it. It worked whenever I made my own sockets and stuff but not now. I don't know if i have to change address.host = ENET_HOST_ANY; in the server to something else or change something with the client or what. I have no idea how to make it work. I just got the code from this website to see if I could get it working or not http://neppramod.wordpress.com/2012/08/12/enet-tutorial/
Do you know what port-forwarding is and why it is important? You may want to study more about how computer networking works before trying to go bare-bones low-level socket programmer and do everything yourself the hard way.
Ya I went into my wifi settings and port forwarded it. I said it worked whenever I made the socket myself but I think im just doing something wrong with enet
And your friend on the other end is connecting to your IP address while you are hosting the server? Have you tried connecting to your own public IP address? http://www.LB-Stuff.com/IP.php <--this is your public IP address
Step one: try connecting to your own public IP address: http://www.LB-Stuff.com/IP.php
If this doesn't work, you have not forwarded your ports properly or you are not hosting or connecting properly. I guess step 0 would be connecting to "localhost".
Okay after I read that I just thought of something. When I was making the sockets and stuff myself that was using TCP, so I changed the port forward thing to UDP and I think its working now. I'll send it to someone tomorrow to make sure.
Well I just sent it to a friend to be sure it was working and it sort of did... The client said that it connected to the server whenever I had the server running, and it said it didn't connect whenever the server wasn't open. So that part worked. Whenever my friend tried sending something to the server, it didn't work. Everything works fine if I connect to the server on my computer, so I don't know if its trying to send it to the wrong place or what.