Re: [Dev-C++] Network Programming Beginner
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Cary H. <xen...@gm...> - 2004-10-21 17:17:54
|
(struct sockaddr*) -- typecast to a pointer that points to a sockaddr struct &socketaddress -- address of socket address. basically it creates a pointer (reference) to socketaddress of the struct sockaddr type. On Thu, 21 Oct 2004 23:25:37 +0900, Peter Dennis <don...@ne...> wrote: > Hi > > Can someone please explain what this code of line means: > > bind( sock, (struct sockaddr*)&socketaddress, sizeof(struct sockaddr); > > I know it means that I am binding the socket with the address structure > but what is the: > (struct sockaddr*)&socketaddress part? > > Is this something like a pointer called sockaddr that holds a struct and > then references? socketaddress? > > Any help interpreting this would be great. > > Many thanks, > > Peter. > > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |