Changeset 14:3caa1d3122db in xplcommon for src/xplcommon/posix/ServerSocket.h
- Timestamp:
- 12/29/12 10:03:12 (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/xplcommon/posix/ServerSocket.h
r6 r14 75 75 * @param reuseaddr if set to true, the SO_REUSEADDR socket option 76 76 * will be set. 77 * 78 * @return if the binding has succeeded. If it is false, the error 79 * code will be set accordingly. 77 80 */ 78 intbind(const struct sockaddr* addr, size_t addrlen,79 bool reuseaddr = true);81 bool bind(const struct sockaddr* addr, size_t addrlen, 82 bool reuseaddr = true); 80 83 81 84 /** 82 85 * Start listening on the socket. 86 * 87 * @return if the call has succeeded. If it is false, the error 88 * code will be set accordingly. 83 89 */ 84 int listen(int backlog = 5); 90 bool listen(int backlog = 5); 91 92 /** 93 * Accept a socket. 94 * 95 * @return the accepted socket. If may be -1, if the socket is 96 * non-blocking, and no connection is available yet, or if another 97 * error occured, in which case the error code will be set properly. 98 */ 99 int accept(struct sockaddr* addr, size_t* addrlen); 85 100 86 101 friend class Acceptor;
Note:
See TracChangeset
for help on using the changeset viewer.