Boost logo

Boost Users :

Subject: Re: [Boost-users] acceptor listen
From: Viatcheslav.Sysoltsev_at_[hidden]
Date: 2011-03-04 03:29:41


On Fri, 04 Mar 2011 08:26:15 +0100, Marco Piacentini
<marcopiacenta_at_[hidden]> wrote:

> 1)Hi guys...I've seen the tutorial and the example, but I don't
> understand why
> the function listen() of the acceptor is never called...despite that new
> connections arrived...how is it possible?

The examples from boost page don't work for you? If they do, there is
obviously something there that you forgotten in your code.

> 2)By the following instructions, I create a socket(a connection
> socket?????or a
> listening socket???) and then pass it at the acceptor
>
> tcp::socket sock (ioserv);
> acceptor.accept(sock);
>
> 3)Now, how can I obtain the other socket(connection or listening
> dependind on
> the previous question)?
> In C, I simply use the socket descriptors which are passed as arguments
> to the
> various functions (listen, bind, accept) and these functions return in
> some
> cases another socket descriptor.
> Then these descriptors are used to closed the different sockets.
> Here, with boost, I don't know how make that.
> Please help me.
> Thanks..

You are having problems with *basic things*, do ***RTFM*** end experiment.
Nobody should do your job for you.

--Slava


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net