Beispiel #1
0
void SelectManager::setArgs(bool read,bool write,bool except,float timeout_sec)
{
    setRead(read);
    setWrite(write);
    setExcept(except);
    setTimout(timeout_sec);
};
Beispiel #2
0
  void SslTcpjob::handshake()
  {
    _socket.handshake(_listener);

    fcntl(_socket.getFd(), F_SETFD, FD_CLOEXEC);

    setRead();
  }
Beispiel #3
0
int					Synchronizer::construct_reads(T_POLLFD *polls, int i)
{
	std::deque<ReadWriteHandler *>::iterator it;
	std::deque<AcceptHandler *>::iterator it2;

	for (it = this->_readHandlers.begin(); it != this->_readHandlers.end(); ++it)
	{
		setRead(polls[i], (*it)->getSocket()->getSocket());
		++i;
	}
	for (it2 = this->_acceptHandlers.begin(); it2 != this->_acceptHandlers.end(); ++it2)
	{
		setRead(polls[i], (*it2)->getSocket()->getSocket());
		++i;
	}
	return (i);
}
Beispiel #4
0
void ForumMessage::copyFrom(ForumMessage * o) {
    setId(o->id());
    setOrdernum(o->ordernum());
    setUrl(o->url());
    setName(o->name());
    setAuthor(o->author());
    setLastchange(o->lastchange());
    setBody(o->body());
    setRead(o->isRead(), false);
}
Beispiel #5
0
	bool ViewFileManager::setRead(const TTHValue& aTTH) noexcept {
		auto file = getFile(aTTH);
		if (!file) {
			return false;
		}

		if (!file->getRead()) {
			file->setRead(true);
			fire(ViewFileManagerListener::FileRead(), file);
		}

		return true;
	}