English 中文(简体)
I wanna make a UDP communication between two or more computers
原标题:

I need to make a connection through wireless or LAN. I have done this on Windows (VS2008 C#, Sockets), but not on Linux (Ubuntu 10.04). I have installed mono, and I can handle many things there, but it s speed is unacceptable for my 600MHz processor, so I decided to move on C++, but I m new to C++ and I m not familiar to many of it s headers. Is there any header or library which can do that for me?

问题回答

How the actual connection is done (if wireless or cable) should be up to the system; if you want to use sockets, I suggest reading of beej guide to network programming , it contains everything (or so) you need to know. It s C mainly, but reusing it for C++ needs no effort.

Did you think about using boost::asio, this way you can share at least the code between linux & windows. The overhead is not that big compared to naked sockets and you have the benefit of better semantics. Many parts of code from boost have flown into standard C++ so the code is of rather high quality.





相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签