Shivam Saboo wrote:
Can you tell me what modifications must I make in the code to change ip address and port?
With the connect() function call on the client, you need to specify the actual address and port of the peer being connected to. With an address of ANY, the only location checked for the peer, would be on the same machine.
Shivam Saboo wrote:
Also after doing necessary changes if both of my PCs are connected to same hotspot will it work or do I have to make some additional changes?
Whether it works or not depends on the network setup. And as long as you have the correct address, any additional changes is likely to be network changes, and not changes to your program.
Henry