Re: using bind() call on FreeBSD

2003-06-25 Thread Jan Grant
On Mon, 23 Jun 2003, Gagan Grewal wrote: > Hi Folks :) > > I am trying to write a simple a server process which follows this sequence... > socket() > bind() > listen() > accept() > . > . > . > close( descriptor from accept() ) > close( descriptor from socket() ) > > But I a

Re: using bind() call on FreeBSD

2003-06-23 Thread Mikko Työläjärvi
On Mon, 23 Jun 2003, Gagan Grewal wrote: > Hi Folks :) > > I am trying to write a simple a server process which follows this sequence... > socket() Assuming a "struct sockaddr_in addr;" around here somewhere, do: memset(&addr, 0, sizeof(addr)); addr.sin_port = htons(blah); etc ... I.e.