View Single Post
  #7   Spotlight this post!  
Unread 02-03-2014, 21:43
yash101 yash101 is offline
Curiosity | I have too much of it!
AKA: null
no team
 
Join Date: Oct 2012
Rookie Year: 2012
Location: devnull
Posts: 1,191
yash101 is an unknown quantity at this point
Re: Visual C++: Getting socket server to run parallel to other processes

Quote:
Originally Posted by AlexBrinister View Post
Personally, I would write a program using MinGW (POSIX) C/C++ but that's just me. Visual C++ threading links:
Microsoft MFC
Stack Overflow - MFC Simple Example
Some other tutorial

Now, if you're going to do this on your ODROID, the story is different because it runs Linux so you have to use the POSIX Standard for threading. Also, wouldn't you have to port your OpenCV program to Linux if you used VC++? I don't know how different it is...

Here are some useful tutorials on network programming and concurrency in a POSIX environment:
YoLinux: POSIX Threads
Sockets in Linux
Linux Magazine - Linux Socket Programming
YoLinux - Sockets

Also, I would use UDP for something like a camera feed because if you use TCP and you drop a few packets, you will get old information because TCP guarantees delivery of all packets. Therefore, the packets you drop will come back and your camera feed will be off. Depending on the amount of data lost, your latency could be significant so I recommend UDP to take care of that problem. If you want to look at some vision code my team wrote last year, you can check out the project home page on our Github page. We used both C networking and POSIX threads.

Good luck!

Alex Brinister
I'm not the greatest fan of MinGW. I love VC++ because I suck at compiling things like OpenCV. My first successful Linux build was today, which I had to get 326 dependencies and use ccmake for the configurer. At least I now have a 2.4.8 bleeding edge build now. The problem comes that there are only 2 IDEs that I really like and understand, Visual Studio and QT Creator. I have kept close to my code and porting from VC++ to C++ should not take more than 15 minutes. One of my main goals since the beginning is cross-compatibility with the code. I spent a long time getting OpenCV to work properly and I like my setup. Also, with a netboot processor, I doubt i can get much performance out of MinGW.