bind and sockaddr

I am trying to create a simple application which uses a socket to listen for
a connection. I have created a socket and now need to bind this socket in
order to make it passive and then listen for a connection.

The bind routine takes a sockaddr structure, defined in sys/socket.h, I’ve
searched the help and can find no details on how this structure should be
set-up.

Help or pointers in the right direction would be helpful, also there seems
to be a distinct lack of examples for any tcp related routines.

Hello,

Take a look at the following address for information on this.
http://qdn.qnx.com/support/docs/tcpip50/prog_guide/index.html

Regards,
Dave B.

Simon Platten <simon.platten@brisco-eng.co.uk> wrote:

I am trying to create a simple application which uses a socket to listen for
a connection. I have created a socket and now need to bind this socket in
order to make it passive and then listen for a connection.

The bind routine takes a sockaddr structure, defined in sys/socket.h, I’ve
searched the help and can find no details on how this structure should be
set-up.

Help or pointers in the right direction would be helpful, also there seems
to be a distinct lack of examples for any tcp related routines.