diff --git a/gsock.cpp b/gsock.cpp index 79dec50..324d662 100644 --- a/gsock.cpp +++ b/gsock.cpp @@ -217,7 +217,7 @@ int sock::setrecvtime(int Second) } //forgive me, but writing code in hospital is really not a good experience. -typedef int (*_sock_getname_callback_t)(int,sockaddr*,socklen_t*); +using _sock_getname_callback_t = decltype(getsockname); static int _sock_getname_call(int sfd,std::string& ip,int& port,_sock_getname_callback_t fn) { diff --git a/gsock.h b/gsock.h index 6b8586a..bbcfa83 100644 --- a/gsock.h +++ b/gsock.h @@ -15,11 +15,11 @@ protected: vsock(); vsock(const vsock&)=delete; vsock& operator = (const vsock&)=delete; - vsock(vsock&&); - vsock& operator = (vsock&&); + vsock(vsock&& v); + vsock& operator = (vsock&& v); ~vsock(); - vsock(int); + //vsock(int); struct _impl; _impl* _vp;