Hello.
I am using UDP protocol to receive a data from another computer in win32 API. For receiving a data I have created the socket,but data is not received from other computer.
But data is getting received when I am sending data from the same computer.
So any other additional settings are there while creating a socket for receiving a data from another computer.
So please tell me some solution to solve my problem. Thank you in advance.
Sorry, but I can't post my code due to my company's rules and regulations.
IP address of source computer is 192.168.10.1 and for destination it is 192.168.10.7.
And one more important thing I need to mention that I am doing socket programming in win 32 API. For other platforms like c++, my code is working properly. But only in win 32 API,I am unable to receive a data. So is there any additional setting is required in case of win32 API ??
Thanx for your reply.
Ok, well at least the computers are on the same subnet (it depends on your subnet mask) so they should be able to ping each other.
And one more important thing I need to mention that I am doing socket programming in win 32 API.
WIN32 uses WinSock, which is derived from Berkeley Sockets, like all other socket implementations. If Windows was significantly different, it wouldn't work with the rest of the internet.
For other platforms like c++, my code is working properly.
C++ is a language, not a platform. So writing it in C++ isn't a factor.
But only in win 32 API,I am unable to receive a data.
Mmm, did you initialise the WinSock with WSAStartup?
One more thing since I am receiving a data from remote computer so I have put UDP socket part in WM_CREATE case of windows procedure function and recvfrom part in FD_READ case of same windows procedure function. Am I doing a right thing?