Reading struct sockaddr_in

Reading struct sockaddr_in

Post by tari » Wed, 20 Feb 2002 11:56:25



Hey,
i have a project for designing a p2p network.I will receive messages
and in a message part of it will be struct sockaddr_in.How can i read
it,can i read it directly to a same type structure.
 
 
 

Reading struct sockaddr_in

Post by Barry Margoli » Thu, 21 Feb 2002 01:10:25




>Hey,
>i have a project for designing a p2p network.I will receive messages
>and in a message part of it will be struct sockaddr_in.How can i read
>it,can i read it directly to a same type structure.

You should probably use something like XDR to marshall the data.  This will
ensure that things like byte order are handled properly.

--

Genuity, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.