* @param fd File descriptor of BufferedSocket
* @param thesock BufferedSocket to attach to
* @param secs_from_now Seconds from now to time out
- * @param now The current time
*/
SocketTimeout(int fd, BufferedSocket* thesock, long secs_from_now) : Timer(secs_from_now), sock(thesock), sfd(fd) { }
nbytes = 0;
}
+ void moveall(SendQueue& other)
+ {
+ nbytes += other.bytes();
+ data.insert(data.end(), other.data.begin(), other.data.end());
+ other.clear();
+ }
+
private:
/** Private send queue. Note that individual strings may be shared.
*/
*/
virtual void Close();
/** This ensures that close is called prior to destructor */
- virtual CullResult cull();
+ virtual CullResult cull() CXX11_OVERRIDE;
/** Get the IOHook of a module attached to this socket
* @param mod Module whose IOHook to return
/** When there is data waiting to be read on a socket, the OnDataReady()
* method is called.
*/
- virtual void OnDataReady() = 0;
+ virtual void OnDataReady() CXX11_OVERRIDE = 0;
/**
* When an outbound connection fails, and the attempt times out, you