Loading src/posix/tcp.cpp +1 −13 Original line number Diff line number Diff line Loading @@ -123,7 +123,6 @@ netplus::tcp::tcp(const char* addr, int port,int maxconnections,int sockopts) : } netplus::tcp::~tcp(){ if(!_Copy) ::close(_Socket); ::free(_SocketPtr); } Loading @@ -134,7 +133,6 @@ netplus::tcp::tcp() : socket() { ((struct sockaddr*)_SocketPtr)->sa_family=AF_UNSPEC; _Socket=::socket(((struct sockaddr*)_SocketPtr)->sa_family,SOCK_STREAM,0); _Type=sockettype::TCP; _Copy=false; } netplus::tcp::tcp(SOCKET sock) : socket(){ Loading @@ -143,16 +141,6 @@ netplus::tcp::tcp(SOCKET sock) : socket(){ ((struct sockaddr*)_SocketPtr)->sa_family=AF_UNSPEC; _Socket=sock; _Type=sockettype::TCP; _Copy=false; } netplus::tcp::tcp(const netplus::tcp& ctcp) : socket (){ _SocketPtr=::malloc(sizeof(ctcp)); _SocketPtrSize=sizeof(ctcp); ((struct sockaddr*)_SocketPtr)->sa_family=((struct sockaddr*)ctcp._SocketPtr)->sa_family; _Socket=ctcp._Socket; _Type=sockettype::TCP; _Copy=true; } void netplus::tcp::listen(){ Loading src/socket.h +1 −2 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ namespace netplus { public: tcp(); tcp(SOCKET socket); tcp(const netplus::tcp& ctcp); tcp(const netplus::tcp& ctcp) = delete; tcp(const char *uxsocket,int maxconnections, int sockopts); tcp(const char *addr,int port,int maxconnections, Loading @@ -108,7 +108,6 @@ namespace netplus { private: int _Maxconnections; std::string _UxPath; bool _Copy; }; class udp : public socket{ Loading src/windows/tcp.cpp +1 −14 Original line number Diff line number Diff line Loading @@ -100,7 +100,6 @@ netplus::tcp::tcp(const char* addr, int port,int maxconnections,int sockopts) : } netplus::tcp::~tcp(){ if(!_Copy) ::closesocket(_Socket); ::free(_SocketPtr); } Loading @@ -111,7 +110,6 @@ netplus::tcp::tcp() : socket() { ((struct sockaddr*)_SocketPtr)->sa_family=AF_UNSPEC; _Socket=::socket(((struct sockaddr*)_SocketPtr)->sa_family,SOCK_STREAM,0); _Type=sockettype::TCP; _Copy=false; } netplus::tcp::tcp(SOCKET sock) : socket() { Loading @@ -120,19 +118,8 @@ netplus::tcp::tcp(SOCKET sock) : socket() { ((struct addrinfo*)_SocketPtr)->ai_family=AF_UNSPEC; _Socket=sock; _Type=sockettype::TCP; _Copy=false; } netplus::tcp::tcp(const netplus::tcp& ctcp) : socket (){ _SocketPtr=::malloc(sizeof(ctcp)); _SocketPtrSize=sizeof(ctcp); ((struct addrinfo*)_SocketPtr)->ai_family=((struct addrinfo*)ctcp._SocketPtr)->ai_family; _Socket=ctcp._Socket; _Type=sockettype::TCP; _Copy=true; } void netplus::tcp::listen(){ NetException exception; if(::listen(_Socket,_Maxconnections) < 0){ Loading Loading
src/posix/tcp.cpp +1 −13 Original line number Diff line number Diff line Loading @@ -123,7 +123,6 @@ netplus::tcp::tcp(const char* addr, int port,int maxconnections,int sockopts) : } netplus::tcp::~tcp(){ if(!_Copy) ::close(_Socket); ::free(_SocketPtr); } Loading @@ -134,7 +133,6 @@ netplus::tcp::tcp() : socket() { ((struct sockaddr*)_SocketPtr)->sa_family=AF_UNSPEC; _Socket=::socket(((struct sockaddr*)_SocketPtr)->sa_family,SOCK_STREAM,0); _Type=sockettype::TCP; _Copy=false; } netplus::tcp::tcp(SOCKET sock) : socket(){ Loading @@ -143,16 +141,6 @@ netplus::tcp::tcp(SOCKET sock) : socket(){ ((struct sockaddr*)_SocketPtr)->sa_family=AF_UNSPEC; _Socket=sock; _Type=sockettype::TCP; _Copy=false; } netplus::tcp::tcp(const netplus::tcp& ctcp) : socket (){ _SocketPtr=::malloc(sizeof(ctcp)); _SocketPtrSize=sizeof(ctcp); ((struct sockaddr*)_SocketPtr)->sa_family=((struct sockaddr*)ctcp._SocketPtr)->sa_family; _Socket=ctcp._Socket; _Type=sockettype::TCP; _Copy=true; } void netplus::tcp::listen(){ Loading
src/socket.h +1 −2 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ namespace netplus { public: tcp(); tcp(SOCKET socket); tcp(const netplus::tcp& ctcp); tcp(const netplus::tcp& ctcp) = delete; tcp(const char *uxsocket,int maxconnections, int sockopts); tcp(const char *addr,int port,int maxconnections, Loading @@ -108,7 +108,6 @@ namespace netplus { private: int _Maxconnections; std::string _UxPath; bool _Copy; }; class udp : public socket{ Loading
src/windows/tcp.cpp +1 −14 Original line number Diff line number Diff line Loading @@ -100,7 +100,6 @@ netplus::tcp::tcp(const char* addr, int port,int maxconnections,int sockopts) : } netplus::tcp::~tcp(){ if(!_Copy) ::closesocket(_Socket); ::free(_SocketPtr); } Loading @@ -111,7 +110,6 @@ netplus::tcp::tcp() : socket() { ((struct sockaddr*)_SocketPtr)->sa_family=AF_UNSPEC; _Socket=::socket(((struct sockaddr*)_SocketPtr)->sa_family,SOCK_STREAM,0); _Type=sockettype::TCP; _Copy=false; } netplus::tcp::tcp(SOCKET sock) : socket() { Loading @@ -120,19 +118,8 @@ netplus::tcp::tcp(SOCKET sock) : socket() { ((struct addrinfo*)_SocketPtr)->ai_family=AF_UNSPEC; _Socket=sock; _Type=sockettype::TCP; _Copy=false; } netplus::tcp::tcp(const netplus::tcp& ctcp) : socket (){ _SocketPtr=::malloc(sizeof(ctcp)); _SocketPtrSize=sizeof(ctcp); ((struct addrinfo*)_SocketPtr)->ai_family=((struct addrinfo*)ctcp._SocketPtr)->ai_family; _Socket=ctcp._Socket; _Type=sockettype::TCP; _Copy=true; } void netplus::tcp::listen(){ NetException exception; if(::listen(_Socket,_Maxconnections) < 0){ Loading