| 123 | } |
| 124 | |
| 125 | void Linkers::TryBind(int port) { |
| 126 | Log::Info("Trying to bind port %d...", port); |
| 127 | if (listener_->Bind(port)) { |
| 128 | Log::Info("Binding port %d succeeded", port); |
| 129 | } else { |
| 130 | Log::Fatal("Binding port %d failed", port); |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | void Linkers::SetLinker(int rank, const TcpSocket& socket) { |
| 135 | linkers_[rank].reset(new TcpSocket(socket)); |