Rev 1987 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1987 | Rev 1989 | ||
|---|---|---|---|
| Line 205... | Line 205... | ||
| 205 | if (args.Length() < 1) |
205 | if (args.Length() < 1) |
| 206 | { |
206 | { |
| 207 | throw atom::exception::missing_in_param(); |
207 | throw atom::exception::missing_in_param(); |
| 208 | } |
208 | } |
| 209 | 209 | ||
| 210 | socket_id = net::Manager::Instance()->StartServer(net:: |
210 | socket_id = net::Manager::Instance()->StartServer(net::TRANSPORT_PROTOCOL_TCP, args[0]->Uint32Value()); |
| 211 | } |
211 | } |
| 212 | catch (std::exception& exception) |
212 | catch (std::exception& exception) |
| 213 | { |
213 | { |
| 214 | atom::log::Exception(log_module_, exception); |
214 | atom::log::Exception(log_module_, exception); |
| 215 | return handle_scope.Close(v8::Boolean::New(false)); |
215 | return handle_scope.Close(v8::Boolean::New(false)); |
| Line 235... | Line 235... | ||
| 235 | throw atom::exception::missing_in_param(); |
235 | throw atom::exception::missing_in_param(); |
| 236 | } |
236 | } |
| 237 | 237 | ||
| 238 | v8::String::AsciiValue address(args[0]); |
238 | v8::String::AsciiValue address(args[0]); |
| 239 | 239 | ||
| 240 | socket_id = net::Manager::Instance()->Connect(net:: |
240 | socket_id = net::Manager::Instance()->Connect(net::TRANSPORT_PROTOCOL_TCP, std::string(*address), args[1]->Uint32Value()); |
| 241 | } |
241 | } |
| 242 | catch (std::exception& exception) |
242 | catch (std::exception& exception) |
| 243 | { |
243 | { |
| 244 | atom::log::Exception(log_module_, exception); |
244 | atom::log::Exception(log_module_, exception); |
| 245 | return handle_scope.Close(v8::Boolean::New(false)); |
245 | return handle_scope.Close(v8::Boolean::New(false)); |