mirror of
https://github.com/Oibaf66/frodo-wii.git
synced 2024-11-22 11:29:24 +01:00
Dead code from NetworkUnix.h
This commit is contained in:
parent
c730b2b185
commit
7d0453cd5c
@ -53,23 +53,6 @@ bool Network::InitSocket(const char *remote_host, int port)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Network::ReceiveData(void *dst, int sock, size_t sz)
|
||||
{
|
||||
size_t received_sz = 0;
|
||||
|
||||
while (received_sz < sz)
|
||||
{
|
||||
int v = read(sock, dst, sz);
|
||||
|
||||
if (v < 0)
|
||||
return false;
|
||||
received_sz += v;
|
||||
}
|
||||
this->traffic += received_sz;
|
||||
|
||||
return sz > 0;
|
||||
}
|
||||
|
||||
ssize_t Network::ReceiveFrom(void *dst, int sock, size_t sz,
|
||||
struct sockaddr_in *from)
|
||||
{
|
||||
@ -86,22 +69,6 @@ ssize_t Network::SendTo(void *src, int sock, size_t sz, struct sockaddr_in *to)
|
||||
return sendto(sock, src, sz, 0, (struct sockaddr*)to, to_sz);
|
||||
}
|
||||
|
||||
bool Network::SendData(void *src, int sock, size_t sz)
|
||||
{
|
||||
size_t sent_sz = 0;
|
||||
|
||||
while (sent_sz < sz)
|
||||
{
|
||||
int v = write(sock, (void*)src, sz);
|
||||
|
||||
if (v < 0)
|
||||
return false;
|
||||
sent_sz += v;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Network::Select(int sock, struct timeval *tv)
|
||||
{
|
||||
fd_set fds;
|
||||
|
Loading…
Reference in New Issue
Block a user