From: Ian Collins on
On 04/ 7/10 09:21 AM, Bill Cunningham wrote:
> "Scott Lurndal"<scott(a)slp53.sl.home> wrote in message
> news:O6Kun.92146$DU3.82888(a)news.usenetserver.com...
>> You should learn "C" before you try sockets.
>
> What do you mean? Do you mean I need to create instances of struct addr
> and then use elements of structs and pointers like in the prototypes? I hope
> it won't be that hard. If so I'll be learning alot about C.

You should understand what can be declared and initialised where. If
your history on comp.lang.c is anything to go by, you've a lot of
learning to go.

--
Ian Collins
From: Barry Margolin on
In article <4bbba5df$0$12439$bbae4d71(a)news.suddenlink.net>,
"Bill Cunningham" <nospam(a)nspam.invalid> wrote:

> "Scott Lurndal" <scott(a)slp53.sl.home> wrote in message
> news:O6Kun.92146$DU3.82888(a)news.usenetserver.com...
> > You should learn "C" before you try sockets.
>
> What do you mean? Do you mean I need to create instances of struct addr
> and then use elements of structs and pointers like in the prototypes? I hope
> it won't be that hard. If so I'll be learning alot about C.

You need to learn that assignment statements can only appear inside
function bodies.

You can initialize global variables in the toplevel, but the
initializers have to be literals, they can't call functions like
socket() or bind() (C++ relaxes this limitation).

--
Barry Margolin, barmar(a)alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
From: Bill Cunningham on

"Barry Margolin" <barmar(a)alum.mit.edu> wrote in message
news:barmar-EA995C.00414607042010(a)news.eternal-
[snip]

> You can initialize global variables in the toplevel, but the
> initializers have to be literals, they can't call functions like
> socket() or bind() (C++ relaxes this limitation).

Ok thanks. I'll try that.

Bill


From: Bill Cunningham on

"Noob" <root(a)127.0.0.1> wrote in message
news:hpfh46$8rv$1(a)speranza.aioe.org...

> Try Beej's Guide to Network Programming
> http://beej.us/guide/bgnet/

Damn. That really is a good thorough site yes thanks. Little more work that
what I expected but that's good for me. I guess I am going to have to write
something of type struct addrinfo and plug in the members. I was looking at
the tutorial on www.opengroup.org it was kind of confusing.

Bill