Changeset 9 in libcf++
- Timestamp:
- 06/06/15 20:40:20 (9 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/cf/network.h
r7 r9 111 111 112 112 /** 113 * bind 114 * @param port port 115 * @throw cf::exception 116 */ 117 cf::void_t bind(const cf::uint16_t port) const 118 throw (cf::exception); 119 120 /** 113 121 * server ready 114 * @param port port115 122 * @param backlog [option] backlog 116 123 * @throw cf::exception 117 124 */ 118 cf::void_t listen(const cf::uint16_t port, 119 const cf::int32_t backlog = 5) const 125 cf::void_t listen(const cf::int32_t backlog = 5) const 120 126 throw (cf::exception); 121 127 -
trunk/src/network.cpp
r8 r9 281 281 } 282 282 283 cf::void_t cf::network::tcp::listen(const cf::uint16_t port, 284 const cf::int32_t backlog) const 283 cf::void_t cf::network::tcp::bind(const cf::uint16_t port) const 285 284 throw (cf::exception) 286 285 { … … 309 308 if (result < 0) 310 309 THROW_EXCEPTION("cannot bind to " << port); 311 312 result = ::listen(mSocket, backlog); 310 } 311 312 cf::void_t cf::network::tcp::listen(const cf::int32_t backlog) const 313 throw (cf::exception) 314 { 315 cf::int32_t result = ::listen(mSocket, backlog); 313 316 if (result < 0) 314 317 THROW_EXCEPTION("cannot listen");
Note:
See TracChangeset
for help on using the changeset viewer.