How to learn EVERYTHING about the protocols, now?

Started by
7 comments, last by Wave 17 years, 11 months ago
I'm right now learning about the UDP, but many questions arises when reading. & that is making me to search on the subject of the question, this can take many hours. Since the protocols are a BIG subject there should be a database with all information. I don't think it whould fit in a book... (not all protocols). But some peoples need to learn all protocols to understand wich protocol they need to use in their programs. But if there is no really smart site that can answer questions that arises when studing the protocols, & do that very clear. No site I've found gives a clear image any protocols... >>If there is no such site: I got a FTP server & I'm willing to write down the answers I'm finding about the UDP. Because it might be too much to write down in a "sticky".
Please comment my english!
Advertisement
There is more to it then learning "protocals". You really need to learn and understand networking. Try looking up the OSI model. That should give you a good start.

theTroll
The book "TCP/IP illustrated" is pretty good.

You also have to understand the difference between transport protocols (where you really only worry about TCP vs UDP) and application layer protocols (where you get things like HTTP vs SMTP vs POP vs ...)

Choosing the right protocol for a specific task is mostly a matter of first deciding on the relevant criteria (performance vs complexity vs features vs guarantees vs ...) and then searching the available litterature FOR THAT PARTICULAR AREA. You don't need to know all protocols on the planet.

For example, if you want to transfer hypertext, there really are only three protocols you need to consider: Gopher, WAIS, and HTTP. A quick look around shows that HTTP has better libraries, it has had more engineering, it has higher-performance servers, and seems to be the right choice for most solutions.

If you want to implement a game, then the question of interoperability isn't yet a question: game clients and game servers are a closed system. Thus, there is no "open" protocol for most online games; at least not yet. Instead, you have to either choose a code library that takes care of the protocol work for you (RakNet, OpenTNL, Net-Z, etc), or you have to carefully design your own.

If you carefully design your own, THEN you need to actually know a lot about networking, which means taking classes at a college, going to industry trade events, reading up on research papers in the area, and studying various available implementations that seem applicable. This process takes many years, just like any other deep learning process where you wish to build expertise.

If you don't have years to spare, then either hire someone who already have the expertise, or use an existing library.
enum Bool { True, False, FileNotFound };
I will make a site if there is no site that answers my questions & alot more q's + the pitfalls of network programming.

Just a little question:
Are you able to send UDP packets without a delimiter byte? (if not where do I find the protocol that don't use a delimiter, is it IP? -more information on the IP?)

Please comment my english!
Just a quick answer:
AFAIK UDP is not streamed, ie if you sendto() a datagram, and it gets to the remote end, it comes in one part. It is TCP where packets can come two-at-a-time or part-by-part, and there you should need some packet separation technique, and it's *really* better to use a header, containing the packet length, then a delimiter byte.

If you *do* use a delimiter byte, you have to scan the data for the end-of-packet and the data itself can't contain bytes with the 'delimiter value'. Or you need escape sequences. Scanning all the data is very slow, that's why it is not used. Maybe only with short strings, like chat data.

If you're bothered with packet size, UDP has more than one 'delimiter byte'. It has an 8-byte header. And it does *not* have a delimiter byte - in the common sense.

Starting a custom protocol off IP is not what a beginner should do. Believe me, I've tried. :)

Good luck on creating that site, if you're up to it! ;)
The RFC databases are a good start[they have exact details on anything from smtp to http to even the wierd ones, like the time setting proto], but in all honesty, protocols for games are pretty much going to be created on a game-to-game basis [not stuff like UDP and TCP, which are very high level, but there are only 2 of those :P.. well.. two in popular use!], since the network traffic often has to be specifically optimized to that individual game.

Learning smtp won't help you make a neato game, but it will help you be able to make a program to process and send email :P [which if that is something your game does, then of course guess it will help you make a neato game].
So do I need to use a delimiter-byte in UDP?

I have searched on google for a long time... Like: "udp without a delimiter", udp+"without delimiter"
I'm sure some site is hiding the knowledge in some other unknown-to-me-term :)

Thank you Peachy... I will see what I can find..

"Good luck on creating that site, if you're up to it! ;)"
I am! Thank you. :)

Please comment my english!
@master_viking:
No. Forget about the delimiter byte. Just sendto() UDP datagrams and recvfrom() them from the other end. The UDP header (constructed automatically) contains packet length, so the system "knows" where the packet ends without any delimiter byte.

So, one more time - you DON'T need any delimiter byte.

Read on Beej's Network Programming Guide, especially the "Son of data encapsulation" section, there's a more detailed answer to your question.
Cisco about IP - This is the one you want!
http://www.cisco.com/univercd/cc/td/doc/cisintwk/ito_doc/ip.htm

EDIT
Not sure how to make proper links, forum codes? or should I use html?

This topic is closed to new replies.

Advertisement