Changeset 14:3caa1d3122db in xplcommon for src/xplcommon/posix/Socket.cc
- Timestamp:
- 12/29/12 10:03:12 (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/xplcommon/posix/Socket.cc
r6 r14 32 32 #include "Socket.h" 33 33 34 #include <cstdio>35 36 34 #include <unistd.h> 37 35 #include <sys/socket.h> … … 45 43 int Socket::socket(int domain, int type, int protocol) 46 44 { 47 int fd = ::socket(domain, type, protocol); 48 if (fd<0) { 49 perror("xplcommon::posix::Socket::socket: socket"); 50 } 51 return fd; 45 return ::socket(domain, type, protocol); 52 46 } 53 47 … … 56 50 Socket::~Socket() 57 51 { 58 ::close(fd);52 if (fd>=0) ::close(fd); 59 53 } 60 54
Note:
See TracChangeset
for help on using the changeset viewer.