Boost logo

Boost Users :

Subject: Re: [Boost-users] passing socket descriptor to a function
From: Igor R (boost.lists_at_[hidden])
Date: 2010-01-27 11:31:05


> hi for the fast answer, i have other question respect to this, what about if
> i wanna a function return the socket descriptor value? what must be the type of value retuned? an int value?

You mean the low-level socket descriptor, which can be used in recv/send etc.?

asio::ip::tcp::socket::native_type
socketDescriptor(asio::ip::tcp::socket &socket)
{
  return socket.native();
}


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