Stuck at Connecting to Auth Server

02/18/2016 07:38 freefora11#1
Hey everyone,

Its been a very long time since I've been on this site(forgot my old password and what email it belong too, username:jedi2011 haha), anyways I'm trying to figure out why I can't connect to a couple sources even though I have them up and running.

The 2 sources I've been playing around with are: Arco's 5071 Source [C#] and CoFusion Reloaded. I've been programming in Java for over a year now(not much networking experience though), and want to fool around with conquer source code to maybe add to my resume later down the road. Most servers are in C# is what I am seeing and its pretty close to Java from what I'm reading.

Anyways I was able to get Redux up and going(added some scripts to it which was great!), but for some reason I can't connect to the other 2. I read through their threads and it seems everyone was able to get into the server atleast while I am stuck at the loading bar saying:"Loading Auth Server...".

The databases seemed fine and happy, I had to go in the source and edit some things to get the servers up, but connecting to them is the problem(I'm using the loader application in the client and doing it locally with my ip address).

Any advice, help, or, lead me to the right direction? Thanks!!

P.s: Another request if you don't mind, since I want to get into conquer development, any good reads or other resources to help me? Thank you
02/18/2016 08:13 Spirited#2
Debugging the server would be a huge first step in identifying what it's getting blocked on. If you're not sure how to debug in Visual Studio, here's a [Only registered and activated users can see links. Click Here To Register...] I made. I'm sure there are videos if you looked around as well. If you're getting errors, that would also be helpful to know. But yeah, follow the code through from the beginning and get to where it starts up the socket system. If your socket system is up and running, let us know and I'll advise you further. If you think your client just isn't connecting properly, check out this other thread I wrote. It may help you out: [Only registered and activated users can see links. Click Here To Register...].

Regarding some helpful topics, I'd recommend looking into the following:
1. Good Programming Style (keep consistent with however you chose to write).
2. Network Programming (Sockets, blocking and non-blocking operations, packets).
3. Threading (Concurrency vs. Parallelism as well).
4. MySQL (if your source uses this).

Spending a few hours on these topics and doing small demo projects of each will really help you out. That's what I did when I first started out. Also, I show this video to everyone who asks about how the internet works. It's very basic, but it's a start. Hopefully you know about latency, ping, ports, IP addresses, etc. You seem pretty competent though. The rest you'll figure out on the way, I'm sure.


It starts off very simple, but starts introducing packets at 2:40. It's also not necessarily correct... but it's still a good introduction. Best of luck, and don't be afraid to ask questions.
02/20/2016 19:30 freefora11#3
Thank you very much for the info yo provided, the video was a great intro to understanding packets. I'm definitely going to look into Network Programming tutorials to get a sense. I found a decent course on Udemy.

Do you reccomend a particular source to study from? The 2 Servers I was able to get up are Redux 3.05 and COPS V6. Redux seems a little more stable and easier to implement things but there is a lot of work to implement to get all of CO2 features installed(and for some reason I can't cannot 2 people to the server with hamachi). With COPS V6 it feels like it is the most completed source I could find, but I would have to translate it into English and it appears the AI is horrible(tried changing some numbers in it, but didn't work), so I would have to rewrite the whole AI on that.

I haven't looked at Hybrids source yet but people say its the best barebones source, but I'm not sure.

Anyways, which one would you guys would say to start from? Thanks!
02/20/2016 20:07 Spirited#4
Honestly, there are a lot of things you can learn from sources here on how not to approach a problem. It's two sides of the same coin, I suppose. Look into sources that you want to look into. Write your own if you want. Improve another source if you want. At the end of the day, you're going to have something to show for it at least. Like, when I started working on sockets and packets, I worked with Tommy on Elite-CoEmu. Was it a bad source? You better believe it, but I learned a lot from it on how to approach certain problems (and not approach certain problems). I also worked on Impulse's base source a lot (improving that socket system, upgrading it to a more recent patch which was 5223 at the time, also had another version that downgraded it to Conquer 1.0). It has a lot of flexibility, and I guess I got the most from that source, looking back. Highly recommend it just because it's got problems but it's simple enough to maintain and fix those problems. But yeah, work on what interests you. I'm sure people would be very willing to provide you with some advice on designing certain systems if you have questions. You could also practice giving back to the community by helping us document packet structures on a patch (I'm sure that would be great practice on how Conquer structures packets as well). But again, it's up to you.
02/20/2016 21:48 freefora11#5
I would be interested in documenting to help figure out what what the source is saying since I don't have experience maintaining other code but my own. What is there to document?
02/20/2016 22:56 pro4never#6
Quote:
Originally Posted by freefora11 View Post
I would be interested in documenting to help figure out what what the source is saying since I don't have experience maintaining other code but my own. What is there to document?
Knowing how many bytes of data and how it's structured for each packet is useful to anyone who is writing their own source. The source you're using likely has quite a few (poorly managed) packets that are not publicly documented so he's saying that'd be a way you could contribute to his wiki.
02/21/2016 00:01 Spirited#7
Quote:
Originally Posted by pro4never View Post
Knowing how many bytes of data and how it's structured for each packet is useful to anyone who is writing their own source. The source you're using likely has quite a few (poorly managed) packets that are not publicly documented so he's saying that'd be a way you could contribute to his wiki.
Exactly. That way you can get familiar with how data is being sent to the client and the structures involved. You'd also be giving back to the community and documenting the packet structures for yourself to look back on. The wiki is found here, at the moment. [Only registered and activated users can see links. Click Here To Register...]
02/21/2016 02:05 freefora11#8
Alright sweet, so I just need to learn more about packets and what data it contains, so i'm assuming one of the sources I have contains all the packets?
02/21/2016 02:22 Spirited#9
Quote:
Originally Posted by freefora11 View Post
Alright sweet, so I just need to learn more about packets and what data it contains, so i'm assuming one of the sources I have contains all the packets?
Not all of them. That's the challenge and reason why we have a packet wiki. The problem is, they're not all documented. The base packets needed for running the game are in there, but not every feature's packet. It comes down to guessing or reverse engineering the client to figure out packet structures. Also, if it helps... you can look at a socket as a file. You can write and read from a file just as you can from a socket (write = send data, read = receive data). In fact, on some operating systems such as Plan9, they *are* files. :p Packets are just the content that you're writing or reading. And just as a file can have a file structure (or order for which you expect things), a packet can have a packet structure. So there are many different types of packet structures that TQ has defined. You can check out the wiki right now and get an idea for what they look like and what they do.
02/22/2016 05:49 freefora11#10
Dang so I will need to find a way to open the sockets to figure that part out, cause I don't care for reverse engineering atm(tried it about 10 years when I was still playing conquer to unlock fps and other edits and did not like it). I'll spend the next month learning more about network programming while studying redux source. Thank you both for taking the time to answer my questions.
02/22/2016 06:21 Spirited#11
Quote:
Originally Posted by freefora11 View Post
Dang so I will need to find a way to open the sockets to figure that part out, cause I don't care for reverse engineering atm(tried it about 10 years when I was still playing conquer to unlock fps and other edits and did not like it). I'll spend the next month learning more about network programming while studying redux source. Thank you both for taking the time to answer my questions.
Here, this will get you rolling: [Only registered and activated users can see links. Click Here To Register...]
Conquer Online uses TCP/IPv4 stream sockets. The notes are in C, but it translates well to C++ and C#. The concept of Berkeley sockets span across most languages.
02/22/2016 06:30 freefora11#12
Haha I never cared for C which is why I took a class in C++ instead. Thank goodness though that C#'s syntax is almost the same as Java. C++ is pretty similiar as well(except the fact it uses pointers, which caused me a lot of bugs in my final project), anyways I'll take a look at the pdf and maybe add it to my before bed reads. Thanks again!
02/22/2016 06:55 Spirited#13
Quote:
Originally Posted by freefora11 View Post
Haha I never cared for C which is why I took a class in C++ instead. Thank goodness though that C#'s syntax is almost the same as Java. C++ is pretty similiar as well(except the fact it uses pointers, which caused me a lot of bugs in my final project), anyways I'll take a look at the pdf and maybe add it to my before bed reads. Thanks again!
Personally, I find C to be amazing after 3 years of solid C++. I know I'll be burned at the stake on this forum if I dive into it too much, but don't underestimate C. After using C for a few months now, there's no way I'd consider going back to C++. You can private message me if you want about that... that type of conversation is unwelcome here. But yeah, that presentation I linked you to explains a lot about sockets and networking.