I see. I think I did have .sin_zero in there (bzero don't work on mscv++) so I have to use memset. but I must have to forgot to add the .sin_zero, thanks everyone. Sean Daley wrote: > > Ok, my socket programming skills aren't very good at > the moment (almost non-existant but not quite) so I > can't comment as to whether or not your method will > work, but some things I see that may be wrong are ... > > 1) > what is DEST_PORT? (ie where does it get setup) I'm assuming > you set it to 25 some place else? > > 2) > Why do you set the members of dest_addr and THEN clear > the structure out with the memset? I think you may want > to move the memset BEFORE you do dest_addr.sin_family = PF_INET > etc. This may make the connect call a little confused > as to where it's trying to connect to. Just a guess though. > > Sean > > > } > > dest_addr.sin_family = PF_INET; > > dest_addr.sin_port = htons(DEST_PORT); > > dest_addr.sin_addr = *((struct in_addr *)he->h_addr); > >// bzero(&(dest_addr.sin_zero), 8); > >memset((char *)&dest_addr, 0, sizeof(dest_addr)); > > /*connect socket to remote host*/ > > +------------------------------------------------------------+ > | Ensure that you have read the CircleMUD Mailing List FAQ: | > | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html | > +------------------------------------------------------------+ +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST