Lines Matching defs:core_
104 explicit ReadDelegate(Core* core) : core_(core) {}
111 Core* const core_;
116 explicit WriteDelegate(Core* core) : core_(core) {}
123 Core* const core_;
189 DCHECK_EQ(object, core_->read_overlapped_.hEvent);
190 if (core_->socket_) {
191 if (core_->socket_->waiting_connect()) {
192 core_->socket_->DidCompleteConnect();
194 core_->socket_->DidCompleteRead();
198 core_->Release();
203 DCHECK_EQ(object, core_->write_overlapped_.hEvent);
204 if (core_->socket_)
205 core_->socket_->DidCompleteWrite();
207 core_->Release();
243 core_ = new Core(this);
331 DCHECK(!core_);
332 core_ = new Core(this);
335 core_->read_overlapped_.hEvent = WSACreateEvent();
338 WSAEventSelect(socket_, core_->read_overlapped_.hEvent, FD_CONNECT);
340 core_->write_overlapped_.hEvent = WSACreateEvent();
355 if (ResetEventIfSignaled(core_->read_overlapped_.hEvent))
366 core_->WatchForRead();
427 core_->Release();
433 core_->Detach();
434 core_ = NULL;
523 DCHECK(!core_->read_iobuffer_);
525 buf_len = core_->ThrottleReadSize(buf_len);
527 core_->read_buffer_.len = buf_len;
528 core_->read_buffer_.buf = buf->data();
531 AssertEventNotSignaled(core_->read_overlapped_.hEvent);
533 int rv = WSARecv(socket_, &core_->read_buffer_, 1, &num, &flags,
534 &core_->read_overlapped_, NULL);
536 if (ResetEventIfSignaled(core_->read_overlapped_.hEvent)) {
543 base::MemoryDebug::MarkAsInitialized(core_->read_buffer_.buf, num);
549 core_->read_buffer_.buf);
557 core_->WatchForRead();
560 core_->read_iobuffer_ = buf;
572 DCHECK(!core_->write_iobuffer_);
577 core_->write_buffer_.len = buf_len;
578 core_->write_buffer_.buf = buf->data();
579 core_->write_buffer_length_ = buf_len;
582 AssertEventNotSignaled(core_->write_overlapped_.hEvent);
584 int rv = WSASend(socket_, &core_->write_buffer_, 1, &num, 0,
585 &core_->write_overlapped_, NULL);
587 if (ResetEventIfSignaled(core_->write_overlapped_.hEvent)) {
601 core_->write_buffer_.buf);
609 core_->WatchForWrite();
612 core_->write_iobuffer_ = buf;
766 int rv = WSAEnumNetworkEvents(socket_, core_->read_overlapped_.hEvent,
792 BOOL ok = WSAGetOverlappedResult(socket_, &core_->read_overlapped_,
794 WSAResetEvent(core_->read_overlapped_.hEvent);
796 core_->read_iobuffer_ = NULL;
803 core_->read_buffer_.buf);
812 BOOL ok = WSAGetOverlappedResult(socket_, &core_->write_overlapped_,
814 WSAResetEvent(core_->write_overlapped_.hEvent);
821 if (rv > core_->write_buffer_length_ || rv < 0) {
825 << core_->write_buffer_length_ << " bytes, but " << rv
834 core_->write_buffer_.buf);
837 core_->write_iobuffer_ = NULL;