• Home
  • Raw
  • Download

Lines Matching refs:rv

34     int rv = socket->RecvFrom(buffer_, kMaxRead, &recv_from_address_,  in RecvFromSocket()  local
36 if (rv == ERR_IO_PENDING) in RecvFromSocket()
37 rv = callback.WaitForResult(); in RecvFromSocket()
38 if (rv < 0) in RecvFromSocket()
40 return std::string(buffer_->data(), rv); in RecvFromSocket()
64 int rv = socket->SendTo(buffer, buffer->BytesRemaining(), in SendToSocket() local
66 if (rv == ERR_IO_PENDING) in SendToSocket()
67 rv = callback.WaitForResult(); in SendToSocket()
68 if (rv <= 0) in SendToSocket()
69 return bytes_sent > 0 ? bytes_sent : rv; in SendToSocket()
70 bytes_sent += rv; in SendToSocket()
71 buffer->DidConsume(rv); in SendToSocket()
79 int rv = socket->Read(buffer_, kMaxRead, &callback); in ReadSocket() local
80 if (rv == ERR_IO_PENDING) in ReadSocket()
81 rv = callback.WaitForResult(); in ReadSocket()
82 if (rv < 0) in ReadSocket()
84 return std::string(buffer_->data(), rv); in ReadSocket()
99 int rv = socket->Write(buffer, buffer->BytesRemaining(), &callback); in WriteSocket() local
100 if (rv == ERR_IO_PENDING) in WriteSocket()
101 rv = callback.WaitForResult(); in WriteSocket()
102 if (rv <= 0) in WriteSocket()
103 return bytes_sent > 0 ? bytes_sent : rv; in WriteSocket()
104 bytes_sent += rv; in WriteSocket()
105 buffer->DidConsume(rv); in WriteSocket()
119 bool rv = ParseIPLiteralToNumber(ip_str, &ip_number); in CreateUDPAddress() local
120 if (!rv) in CreateUDPAddress()
133 int rv = server.Listen(bind_address); in TEST_F() local
134 EXPECT_EQ(OK, rv); in TEST_F()
140 rv = client.Connect(server_address); in TEST_F()
141 EXPECT_EQ(OK, rv); in TEST_F()
144 rv = WriteSocket(&client, simple_message); in TEST_F()
145 EXPECT_EQ(simple_message.length(), static_cast<size_t>(rv)); in TEST_F()
152 rv = SendToSocket(&server, simple_message); in TEST_F()
153 EXPECT_EQ(simple_message.length(), static_cast<size_t>(rv)); in TEST_F()
178 int rv = server1.Listen(bind_address); in TEST_F() local
179 EXPECT_EQ(OK, rv); in TEST_F()
184 rv = server2.Listen(bind_address); in TEST_F()
185 EXPECT_EQ(OK, rv); in TEST_F()
191 rv = client.Connect(server_address); in TEST_F()
192 EXPECT_EQ(OK, rv); in TEST_F()
195 rv = WriteSocket(&client, simple_message); in TEST_F()
196 EXPECT_EQ(simple_message.length(), static_cast<size_t>(rv)); in TEST_F()
204 rv = client.GetLocalAddress(&client_address); in TEST_F()
205 EXPECT_EQ(OK, rv); in TEST_F()
208 rv = SendToSocket(&server2, foreign_message, in TEST_F()
210 EXPECT_EQ(foreign_message.length(), static_cast<size_t>(rv)); in TEST_F()
213 rv = SendToSocket(&server1, simple_message, in TEST_F()
215 EXPECT_EQ(simple_message.length(), static_cast<size_t>(rv)); in TEST_F()
244 int rv = client.Connect(remote_address); in TEST_F() local
245 if (tests[i].may_fail && rv == ERR_ADDRESS_UNREACHABLE) { in TEST_F()
251 EXPECT_LE(ERR_IO_PENDING, rv); in TEST_F()
254 rv = client.GetLocalAddress(&fetched_local_address); in TEST_F()
255 EXPECT_EQ(OK, rv); in TEST_F()
264 rv = client.GetPeerAddress(&fetched_remote_address); in TEST_F()
265 EXPECT_EQ(OK, rv); in TEST_F()
275 int rv = server.Listen(bind_address); in TEST_F() local
276 EXPECT_EQ(OK, rv); in TEST_F()
279 rv = server.GetLocalAddress(&local_address); in TEST_F()
280 EXPECT_EQ(rv, 0); in TEST_F()
291 int rv = server.Listen(bind_address); in TEST_F() local
292 EXPECT_EQ(OK, rv); in TEST_F()
295 rv = server.GetPeerAddress(&peer_address); in TEST_F()
296 EXPECT_EQ(rv, ERR_SOCKET_NOT_CONNECTED); in TEST_F()
304 int rv = server.Listen(bind_address); in TEST_F() local
305 EXPECT_EQ(OK, rv); in TEST_F()
309 rv = server.RecvFrom(buffer_, kMaxRead, &from, &callback); in TEST_F()
310 EXPECT_EQ(rv, ERR_IO_PENDING); in TEST_F()