0
Doubt on Socket Programming
Hello, I have a problem with my code shown below. The program compiles successfully without any error. But when running it shows only upto " For testing ". It doesnt print "Waiting for a client ". ie,from the statement just above the accept() function is not working. And when i try to connect to this server program with another program written in python (and on windows platform) it shows error like " ...target system actively refused to connect " My server program is on Ubuntu platform. https://code.sololearn.com/cj6gEmV23HX6/?ref=app
4 Antworten
0
Devices on the same network (like many devices connected to a hotspot) share almost similar IP addresses assigned locally but devices on some other network would be invisible to this one.
For communication between devices on different networks you would need to check for port forwarding.
Below link might help :-
https://stackoverflow.com/questions/15308411/communication-betwen-client-and-servver-running-on-two-different-machines-using
0
Did you start the server first?
Also check if the port you are using is not being used by some other program (and obviously both the client and server are on the same network).
0
Tanmoy
It works well when both server and client programs are executed on the same system.....
But the problem is when they are on different networks......
Why is it so....???
0
Tanmoy
Okayy.....let me check it......
Thankyou