CopyData is more efficient than a PeekData+memcpy pair

This commit is contained in:
Mathieu Lacage committed 2009-06-08 16:42:06 +02:00
1 parent 61b02588e4
commit 649de6a211
1 file changed
+2 -2
+2 -2
View File
@@ -148,7 +148,7 @@ Socket::Recv (uint8_t* buf, uint32_t size, uint32_t flags)
{
return 0;
}
memcpy (buf, p->PeekData (), p->GetSize());
p->CopyData (buf, p->GetSize ());
return p->GetSize ();
}
@@ -169,7 +169,7 @@ Socket::RecvFrom (uint8_t* buf, uint32_t size, uint32_t flags,
{
return 0;
}
memcpy (buf, p->PeekData (), p->GetSize());
p->CopyData (buf, p->GetSize ());
return p->GetSize ();
}