20 lines
429 B
C++
20 lines
429 B
C++
#pragma once
|
|
#include "socket.h"
|
|
|
|
namespace Network {
|
|
|
|
class TCPSocket : public Socket {
|
|
public:
|
|
using Socket::init;
|
|
using Socket::Socket;
|
|
TCPSocket(int domain);
|
|
|
|
int init(int domain);
|
|
int listen(int __n);
|
|
void accept(std::shared_ptr<TCPSocket>& newSock, Address& addr);
|
|
int recv(void* __restrict __buf, size_t __n, int __flags);
|
|
int send(const void* __buf, size_t __n, int __flags);
|
|
};
|
|
|
|
} // namespace Network
|