Please direct me to an article that discusses the difference between a UDP Server application and the Client application.
So far I surmise that the server starts with no knowledge of where a client might be. It can either begin broadcasting data (this is my current need) or listen for a client to connect.
On the other hand, the client must know the address of the server and it either begins listening for broadcasts from the server or it sends a message to the server to accomplish something, such as to solicit some information from the server.
I have done that. Here is the first page of results from my good search for “udp sockets”
Before providing the list, I do suspect that if I already knew the differences I may well find that information in these sites. As I do not, that information can be rather difficult to pick out.
https://www.cs.rutgers.edu/~pxk/417/notes/sockets/udp.html goes right to code, does not discuss the difference http://www.cs.dartmouth.edu/~campbell/cs60/socketprogramming.html does not discuss why there is client and server with UDP https://en.wikipedia.org/wiki/Network_socket does not discuss https://www.w3.org/TR/tcp-udp-sockets/ Section 9 begins UDP, jumps right into code with no explanation Just for the record, this is the most thorough discussion I have found http://www.binarytides.com/programming-udp-sockets-c-linux/ does not discuss the differences https://www.abc.se/~m6695/udp.html does not discuss https://developer.chrome.com/apps/sockets_udp does not discuss https://cs.nyu.edu/~bacon/phd-thesis/diss/node32.html does not discuss the differences https://wiki.python.org/moin/UdpCommunication “server” is in the article in only one place discussing a Windows bug http://www.microhowto.info/howto/listen_for_and_receive_udp_datagrams_in_c.html Starts off with: Suppose that you wish to write a server that implements the … But does not address the differences. References RFC 867 which does not discuss the differences
Do I need to continue? I am looking for a discussion on the differences between server and client in UDP operations. Not in the code difference but in the difference in concept between the two. Looks to me like two servers or two clients can well carry on a conversation via UDP packets.
There is no requirement for handshaking on UDP so who is server and who is client is purely notional.
In human perspectives it's like two people talking on a CB band and one claiming they are the server and the other the client. The answer is purely in the eyes of the beholder and it is completely meaningless to the operation.
It is the EXACTLY the same situation you have two parties chatting using UDP and no-one is in control. Either party can choose a) not to send or b) not to listen and so the idea of who is server and who is client is pointless. Generally the thing that makes that decision is where the data is coming from and going to which has nothing to do with the protocol. However for any situation you gave me I could always argue the server is the other end to the one you choose (you just have to pick the right criteria).
To give you an example consider SNMP packets sent from a router back to be logged to a central site (your ISP usually has a display log of your data usage using this). Is the SNMP server the central site or is it the router sending the SNMP packets? Well if you goto the router settings they will generally call themselves the SNMP server. Most likely your SNMP monitor software will also call itself a server because it has the database and is running on an actual server. So which is server and which is client .. well non-one cares it changes nothing
Hi there, I have an application which requires to read the credentials and login to the DB. Since my application runs on schedule, someone has to fed in the credentials.
Storing the credentials in flat file with any encryption (including DPAPI) is not helping as the entropy will be stored in the same file and it can be easily retrieved.
Thought of having the Salt for the entropy in-memory which will be key-ed in by the user through an application that will be written on a secured shared memory and the same will only be able to access by my own process (with validating the Digital signature thump print).
The provision of creating the shared segment is done by a DLL and the Client process which sets the password and my process which reads the password is digitally signed and I can validate the same in the DLLMain - PROCESS_ATTACH. If the digital signature is invalid, I'm unloading the DLL by terminating the same.
All worked well with LoadLibrary API and when we tried testing with LoadLibraryEx with the option: DONT_RESOLVE_DLL_REFERENCES, it was not hitting the DLLMain and was able to call all the exported functions.
My query is that is there a way to securely share a data between two trusted application alone? The application is developed using C++.
You can use a memory-mapped file with an obscure name. This won't prevent a hacker from being able to see the file but it will be far from obvious. You can obscure the data you place in the MMF by negating it or something simple like that.
Another way is to use an interprocess communication mechanism. Some examples are pipes, sockets, the WM_COPYDATA message, and there are others. It is possible for a socket message to be intercepted but the other two are much more difficult to spoof.
I re-wrote my IPC methodology in the following manner Since I am creating the child process GUI I have the option of inheritable handles. One of those is a event which I signal From the console app to the MFC application
The event lives in a worker thread which basically has 2 api's WaitForSingleMessage and once signaled a PostMessage. The m_hWnd is the CMainFrame main window I create in the main thread CWinApp Thing is like the SendMessage which I was doing from process to process I now have intermittent errors with this too I tried AfxGetMainWnd()->PostMessage seeing if maybe there was something wrong with the HWND First off is there any problem using a m_hWnd created in the main thread in worker thread to send a message I have read about thread maps of handles I am not sure if it relates to my scenario
I tried AfxGetMainWnd()->PostMessage seeing if maybe there was something wrong with the HWND First off is there any problem using a m_hWnd created in the main thread in worker thread to send a message
It is not correct according to AfxGetMainWnd: "If AfxGetMainWnd is called from the application's primary thread, it returns the application's main window according to the above rules. If the function is called from a secondary thread in the application, the function returns the main window associated with the thread that made the call."
And "yes", you can pass "a m_hWnd created in the main thread in worker thread to send a message" from a worker thread.
Thanks for your help my code as seems to be posting messages i added the ChaneWindowMessageFilterEx per jochen don't know if It's needed if posting in the same process and it seems that my messages to delivered
I want to overwrite a selected Image in a particular path
That is rather unclear. Please edit your question and be more specific.
Are you referring to an image file stored on the disk with known path and file name? What is the image source that you want to store (another file, a bitmap in memory)? What image format should be used (BMP, JPG, TIFF, PNG)?
I'm trying to create Instant Messaging software for Windows.
What are the options for the core chat technology?
Is Microsoft Bot Framework a good choice for one-one chat?
Its planed for man-bot so not sure about that...
In addition I don't want to implement it from the ground, WINSOCK etc
I prefer use an already tested platform or library for that
Is DCOM or MSMQ a good choise ?
CodeProject is not a code writing service. See also the sticky post (actually) above yours:
2. Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with. 11. If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
We will help if you got stuck at specific portions of your code. But if you need code written for you, you probably have to hire someone and pay for it.
Also, we do not do the assignments for students and it will be against our rules and will not help you in any way. The assignments are assigned to you to help you focus on programming.
If you are having trouble, consult your teacher and ask him to guide you in the process so that you can do it. If you still face issues, try group study and talk about the problem in the group and ask help from peer students.
However, if you face any problem during the programming; such as errors occur, do come here and we will help a bit.
One more thing: Sharing the email online will only help spammers, who are always building their email databases, to send lottery win emails. You get the point, please do not share the emails on online forums. They are not safe.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
We do not do your HomeWork. HomeWork is not set to test your skills at begging other people to do your work, it is set to make you think and to help your teacher to check your understanding of the courses you have taken and also the problems you have at applying them. Any failure of you will help your teacher spot your weaknesses and set remedial actions. So, give it a try, reread your lessons and start working. If you are stuck on a specific problem, show your code and explain this exact problem, we might help.
As programmer, your job is to create algorithms that solve specific problems and you can't rely on someone else to eternally do it for you, so there is a time where you will have to learn how to. And the sooner, the better. When you just ask for the solution, it is like trying to learn to drive a car by having someone else training. Creating an algorithm is basically finding the maths and make necessary adaptation to fit your actual problem.
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
The child probably wont see the message because the parent isn't passing it up. Very few messages are passed from a parent to a child unless you specify it beyond the obvious stuff like keyboard and mouse. Depending on the ID it isn't clear to me a message will be passed to a child window I need to know more about the window types and flags involved.
Starting with Windows Vista, the application that is to receive the WM_COPYDATA message must call the ChangeWindowMessageFilterEx function. Otherwise the the message will not be received. It will be blocked by UIPI.
Last Visit: 31-Dec-99 19:00 Last Update: 24-Feb-17 9:46