| | 282 | try { |
|---|
| | 283 | |
|---|
| | 284 | // Construct the node factory given the *local* |
|---|
| | 285 | // address to bind to (this allows us to select among |
|---|
| | 286 | // multiple network interfaces on the client). Note |
|---|
| | 287 | // that we're not yet using the (detected) external |
|---|
| | 288 | // IP; that comes later. |
|---|
| | 289 | factory = new SocketPastryNodeFactory( |
|---|
| | 290 | new RandomNodeIdFactory(g_pastryEnv), |
|---|
| | 291 | localHost, port, g_pastryEnv); |
|---|
| | 292 | |
|---|
| | 293 | } catch (IOException exc) { |
|---|
| | 294 | Logger.global.severe("error: couldn't create node factory; bailing"); |
|---|
| | 295 | status.notifyStatus(ClientStatus.STATUS_FATAL_ERROR, |
|---|
| | 296 | "Error loading Pastry network code"); |
|---|
| | 297 | |
|---|
| | 298 | return null; |
|---|
| | 299 | } |
|---|
| | 300 | |
|---|
| 306 | | try { |
|---|
| 307 | | |
|---|
| 308 | | // Construct the node factory given the *local* |
|---|
| 309 | | // address to bind to (this allows us to select among |
|---|
| 310 | | // multiple network interfaces on the client). Note |
|---|
| 311 | | // that we're not yet using the (detected) external |
|---|
| 312 | | // IP; that comes later. |
|---|
| 313 | | factory = new SocketPastryNodeFactory( |
|---|
| 314 | | new RandomNodeIdFactory(g_pastryEnv), |
|---|
| 315 | | natAddr, port, g_pastryEnv); |
|---|
| 316 | | |
|---|
| 317 | | } catch (IOException exc) { |
|---|
| 318 | | Logger.global.severe("error: couldn't create node factory; bailing"); |
|---|
| 319 | | status.notifyStatus(ClientStatus.STATUS_FATAL_ERROR, |
|---|
| 320 | | "Error loading Pastry network code"); |
|---|
| 321 | | |
|---|
| 322 | | return null; |
|---|
| 323 | | } |
|---|
| 324 | | |
|---|