TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Rob Basler
from: Jonathan de Boyne Pollard
date: 1999-11-18 12:39:16
subject: sendto() doesn`t work on WSeB

 RB>      /* Bind the UDP socket to the server address. */
 RB>      client.sin_family      = AF_INET;    /* Server is in Internet Domain 
*/
 RB>      client.sin_port        = 0;          /* Any port in a storm */
 RB>      client.sin_addr.s_addr = INADDR_ANY; /* Server's Internet Address    
*/
 RB>      if (bind(s, (struct sockaddr *)&client, sizeof(client)) < 0) {
 RB>          return(-1);
 RB>      }

What that is actually doing is binding an address to the *local* end of the
socket, not the remote end.  Your comments are wrong.

Given the address that you are binding to the client end, I have to ask:  Is
it the *server* end that is receiving the "no route to host" errors ?  

 ¯ JdeBP ®

--- FleetStreet 1.22 NR
* Origin: JdeBP's point, using Squish (2:257/609.3)

SOURCE: echoes via The OS/2 BBS

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.