> On Nov. 14, 2014, 5:42 p.m., Benjamin Hindman wrote:
> > 3rdparty/libprocess/src/process.cpp, lines 1585-1587
> > <https://reviews.apache.org/r/27960/diff/1/?file=760931#file760931line1585>
> >
> >     Why not have 'get()' return the int file descriptor? Then you can just 
> > do:
> >     
> >     return io::read(get(), data, length);
> >     
> >     In order to make sure that the socket has been created.
> >     
> >     I also think the implicit cast operator should be implemented in terms 
> > of get() too:
> >     
> >     operator int () const
> >     {
> >       return impl->get();
> >     }
> >     
> >     And are you sure that 'get' needs to be const? It would be nice if we 
> > didn't have to do 'mutable int s'.

It needs to be constant since we commonly want to get the fd from a const 
Socket.


- Joris


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27960/#review61453
-----------------------------------------------------------


On Nov. 14, 2014, 9:19 p.m., Joris Van Remoortere wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27960/
> -----------------------------------------------------------
> 
> (Updated Nov. 14, 2014, 9:19 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Niklas Nielsen.
> 
> 
> Bugs: MESOS-1330
>     https://issues.apache.org/jira/browse/MESOS-1330
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See Summary.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/socket.hpp 
> 66838814236fc064a2463399fb15f4a815879bf5 
>   3rdparty/libprocess/src/process.cpp 
> a34b8702b01dec9c954552de0b923866d172c453 
> 
> Diff: https://reviews.apache.org/r/27960/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Joris Van Remoortere
> 
>

Reply via email to