Hi,
I'm trying to create a very simple client server program under unix/linux that sends packets/msgs of arbitary sizes from the client to the server over a LAN. Right now I'm trying to send a simple "Hello" string from the client to the server, and have the server print it on screen, and this works if the client and server programs are running on the same machine and the host.sin_addr.s_addr(where host is either the client or server) is set to the same value (either inet_addr("127.0.0.1") or inet_addr("ip address")). However, if they are running on different machines on the same network, the server doesn't seem to receive the string. I've changed the host.sin_addr.s_add to the appropriate values(dotted decimal) but this doesn't seem to work. sendto() isn't giving me an errno either, so I don't know what's wrong.
Any ideas on why this isn't working?
Thanks!
I'm trying to create a very simple client server program under unix/linux that sends packets/msgs of arbitary sizes from the client to the server over a LAN. Right now I'm trying to send a simple "Hello" string from the client to the server, and have the server print it on screen, and this works if the client and server programs are running on the same machine and the host.sin_addr.s_addr(where host is either the client or server) is set to the same value (either inet_addr("127.0.0.1") or inet_addr("ip address")). However, if they are running on different machines on the same network, the server doesn't seem to receive the string. I've changed the host.sin_addr.s_add to the appropriate values(dotted decimal) but this doesn't seem to work. sendto() isn't giving me an errno either, so I don't know what's wrong.
Any ideas on why this isn't working?
Thanks!