Sockets programming example

I need to write a sockets client to send text messages to a Windows
sockets server. Does anyone have a “Hello world” type example they
could direct me to or share? I have not done any sockets programming
before. Thanks.

I would suggest investing in the book UNIX Network Programming Vol 1 by
Richard Stevens (ISBN 013490012). It will provide you examples galore and
help you avoid the many common pitfalls of socket programming.

Also doing a google search you can read this FAQ on sockets
http://www.ibrado.com/sock-faq/ which might be of interest.

-Adam

Bruce Davis <bd1354@yahoo.com> wrote in message
news:3EEA025A.E17F6748@yahoo.com

I need to write a sockets client to send text messages to a Windows
sockets server. Does anyone have a “Hello world” type example they
could direct me to or share? I have not done any sockets programming
before. Thanks.

A much simpler book is “The Pocket Guide to TCP/IP Sockets” by Michael J
Donahoo & Kenneth L Calvert (ISBN 1-55860-686-6). It has sample code that
you can use as the basis of your applications. And all for $14.99:-)

Jim Douglas

“Adam Mallory” <amallory@qnx.com> wrote in message
news:bcd1va$90m$1@nntp.qnx.com

I would suggest investing in the book UNIX Network Programming Vol 1 by
Richard Stevens (ISBN 013490012). It will provide you examples galore and
help you avoid the many common pitfalls of socket programming.

Also doing a google search you can read this FAQ on sockets
http://www.ibrado.com/sock-faq/ > which might be of interest.

-Adam

Bruce Davis <> bd1354@yahoo.com> > wrote in message
news:> 3EEA025A.E17F6748@yahoo.com> …
I need to write a sockets client to send text messages to a Windows
sockets server. Does anyone have a “Hello world” type example they
could direct me to or share? I have not done any sockets programming
before. Thanks.

I find that this book glosses over the major differences network
programming, doesn’t talk about all the name/ip resolving functions
available etc. That said, it’s a handy API quick lookup book. On the other
hand, Stevens book starts you off with a very basic echo client, and builds
from there - it doesn’t get much easier (and has lots more info if you want
it).

So if a short cookbook/API reference is what you’re looking for, the pocket
guide should fit the bill.

-Adam

Jim Douglas <jim@dramatec.co.uk> wrote in message
news:bcnick$a4a$1@inn.qnx.com

A much simpler book is “The Pocket Guide to TCP/IP Sockets” by Michael J
Donahoo & Kenneth L Calvert (ISBN 1-55860-686-6). It has sample code that
you can use as the basis of your applications. And all for $14.99:-)

Jim Douglas

“Adam Mallory” <> amallory@qnx.com> > wrote in message
news:bcd1va$90m$> 1@nntp.qnx.com> …

I would suggest investing in the book UNIX Network Programming Vol 1 by
Richard Stevens (ISBN 013490012). It will provide you examples galore
and
help you avoid the many common pitfalls of socket programming.

Also doing a google search you can read this FAQ on sockets
http://www.ibrado.com/sock-faq/ > which might be of interest.

-Adam

Bruce Davis <> bd1354@yahoo.com> > wrote in message
news:> 3EEA025A.E17F6748@yahoo.com> …
I need to write a sockets client to send text messages to a Windows
sockets server. Does anyone have a “Hello world” type example they
could direct me to or share? I have not done any sockets programming
before. Thanks.
\

Quick ‘n’ dirty, or in-depth. Take your pick!

Jim

“Adam Mallory” <amallory@qnx.com> wrote in message
news:bcnmcb$t1e$1@nntp.qnx.com

I find that this book glosses over the major differences network
programming, doesn’t talk about all the name/ip resolving functions
available etc. That said, it’s a handy API quick lookup book. On the
other
hand, Stevens book starts you off with a very basic echo client, and
builds
from there - it doesn’t get much easier (and has lots more info if you
want
it).

So if a short cookbook/API reference is what you’re looking for, the
pocket
guide should fit the bill.

-Adam

Jim Douglas <> jim@dramatec.co.uk> > wrote in message
news:bcnick$a4a$> 1@inn.qnx.com> …
A much simpler book is “The Pocket Guide to TCP/IP Sockets” by Michael
J
Donahoo & Kenneth L Calvert (ISBN 1-55860-686-6). It has sample code
that
you can use as the basis of your applications. And all for $14.99:-)

Jim Douglas

“Adam Mallory” <> amallory@qnx.com> > wrote in message
news:bcd1va$90m$> 1@nntp.qnx.com> …

I would suggest investing in the book UNIX Network Programming Vol 1
by
Richard Stevens (ISBN 013490012). It will provide you examples galore
and
help you avoid the many common pitfalls of socket programming.

Also doing a google search you can read this FAQ on sockets
http://www.ibrado.com/sock-faq/ > which might be of interest.

-Adam

Bruce Davis <> bd1354@yahoo.com> > wrote in message
news:> 3EEA025A.E17F6748@yahoo.com> …
I need to write a sockets client to send text messages to a Windows
sockets server. Does anyone have a “Hello world” type example they
could direct me to or share? I have not done any sockets
programming
before. Thanks.


\