Trying to get into network programming, but I seem not to have a clear direction on were I should start. I already know what language and library (C++ and SFML), but I don't know were to begin and what else I need. Do I require some kind of server such as Apache? Can someone lead me to any library agnostic books or readings that have to do with network programming? SFML has documentation but I feel as though its not enough. Kinda stuck, and I don't know were the next logical step would be.
Any help or suggestions would be appreciated, thanks in advance.
(Sorry if this is in the wrong section, I was unsure)
You first need to know the fundamentals of networking. I suggest looking around and reading a few articles about the basics of how networks actually work. Then look into client-server architecture and work on creating your own client-server application. Once you do this, you should be comfortable enough with networks to branch out.
Network programming can be a complicated beast, it's something that can be hard to just jump into blind. You do need some sort of background knowledge first.
Also, Apache isn't something you need. That is a network application in itself, namely it's a web server. If you want to build a website, you'd be using Apache or Tomcat or one of the various other web servers out there.
It explains the bare basics of networking but assumes you are programming on Linux , you could probably convert the examples to SFML or winsocks easily.
Even if you don't run the examples given , it's a good place to learn the basics anyway.
Thanks for the resource a k n, I will take a look at it. I have noticed similar functions between the library that is being used and SFML, so the underlying concepts should be the same.
It always makes me cringe inside when people just link the beej tutorials. Of course they're great for learning the BSD socket-based APIs (like WinSock2 and Linux's), but they don't really teach any client server architecture. I'd recommend downloading some source code, like the original Quake, and taking a peak at how it's networking was handled. That will teach you a good client server design that you can use in other projects (assuming you want to get into game programming)
Yeah, but I'm not saying not to use documentation. You should use Beej's tutorials for learning BSD sockets, but a real world example for a server-client architecture. Sadly there isn't any reputable sources for learning other than looking at source code that I know of.
As mentioned above some of the best ways to learn about real world examples would be through real source code and documentation, though you of course will probably need to have a good grounding in the basics and probably advanced topics of the subject to even attempt trying to understand any source code in actual use.
But anyways thought I would drop a suggestion on a book that I found helpful on the subject of networking though it specifically has to deal with networking for real time applications. Though since the OP mentioned he is using SFML I assume he is aiming towards some real time graphical application to use networking in.
I found that book very helpful to explaining networking for real time applications. It actually broke down and explained what goes into real world networking in a way that I could understand easily. The only downfall for me was that is semi old (2009) so some technology has advanced a bit though what the book teaches is still very much relevant in my opinion. Anyways that is a good book that I would suggest on the subject.