I am starting my research for implementing passing data between embedded hardware and PC.
I have been using SSH and TCP/IP during development , however , I am deliberately NOT using term "clinet / server". Prefer somewhat functional - transfer single (stream) of "data" as a result of an analysis performed by the embedded hardware to be displayed on PC.
Start with wired communication, then switch to wireless technology.
As simple as that.
Since the embedded hardware has limited resources I do NOI want any "plug and pray" framework style code, DLL(using Linux) , libraries - just plain C++ with minimal support.
I do not need the cutting edge code ether, I just want rudimentary C++.
I can manage the communication media and PC GUI.
But I am pretty green when it comes to sockets , TCP/IP etc.
Will this class fit the bill - as a foundation to build on ?
I cannot tell.
Yes or no will suffice as an answer. No details necessary.
I have no idea what a socket has to do with plug and play.
I also don't understand what embedded hardware has to do with my project.
Are you using an embedded Windows?
My code runs only on Windows, not on embedded hgardware.
If you want to use SSH you will need a LOT more code than this project.
> I am deliberately NOT using term "clinet / server"
Whenever you use a socket you MUST decide if it runs as client or server.
A socket can be opened with listen() or with connect()
So you cannot avoid this term.
Finally as I dont understand what you want to do I cannot answer your question.
Well that is very easy to solve.
It is a setting in the C++ project that must be changed.
Search for that error on Google and you will find hundreds of results.
Don't get frustrated by many errors in Visual Studio.
Just fix the FIRST error that appears and recompile.
Often the other errors are only the consequence of the first one.
Or they are the same error that repeats a thousand times.
I don't have VS 2013.
But I doubt that there is so much to be changed.
Microsoft makes all programmers in the world happy with their changes that brake existing code.
For that reason I do not use a new VS version each time they release one.
Why do you use VS 2013?
Do you really need that?
Tell me please, how to organize the reception of more than 64 sockets , for example, 250 one-time fee .
Is this piece of code can be customized to your code ?
typedef struct _WAIT_THREAD_INFORMATION
} WAIT_THREAD_INFORMATION, *PWAIT_THREAD_INFORMATION;
if( dwWaitHandleCount <= dwMaximumWaitObjects )
// Create separate threads to wait on maximum wait objects
// and then make this thread wait on thread handles
dwThreadCount = dwWaitHandleCount / dwMaximumWaitObjects;
dwLastWaitCount = dwWaitHandleCount % dwMaximumWaitObjects;
if( dwLastWaitCount > 0 )
// This function can handle a maximum of
// MAXIMUM_WAIT_OBJECTS * MAXIMUM_WAIT_OBJECT handles
if( dwThreadCount > dwMaximumWaitObjects )
dwThreadCount = dwMaximumWaitObjects;
dwLastWaitCount = 0;
pThreadWaitHandles = new HANDLE[ dwThreadCount ];
pWaitInformationArray = new WAIT_THREAD_INFORMATION[ dwThreadCount ];
LPVOID lpParameter = NULL
// Thread routine which calls WaitForMultipleObjects
// This is used to wait for more than MAXIMUM_WAIT_OBJECTS objects
DWORD dwReturnValue = 0;
PWAIT_THREAD_INFORMATION pThreadInformation = NULL;
Thank you very much for this great sample, I recently used this sample to start in this socket programming. I'm kind of new in this. I've got a question, in this case you take what you receive and put in a string variable, but in my case I receive 4 bytes and n*56 bytes at next just as it's shown in the output window in your app. I know exactly what comes in the first four bytes but I don't see how can I read the first byte or the byte n in this example I only see this DWORD variable that I assume give us the number of bytes, could you please give me some guidance I'd be very thankful.
I appreciate the work you have done! This is exactly what I am looking for, although MFC is not my strong point. To be honest, I have only began programming over the last couple of years, my primary focus has been hardware engineering, but I need programs to do what I want, so I am branching out.
Here is my silly question, and please forgive my ignorance:
Where do I put code that will validate responses from the telnet server to pursue a specific action?
Here is what I am doing: Telnetting into microwave communications radios (LTE, Backhaul, etc) and setting their frequencies.
I have all the telnet commands I need to program the radios, set the output in dbm, bandwidth, etc.
My end goal is to remove operators programming radios manually, and saving significant amounts of time.
I just am not sure of where to put this code.
Again, brilliant work, I appreciate your feedback.