164 |
if (bindAddr == null) |
if (bindAddr == null) |
165 |
bindAddr = InetAddress.ANY_IF; |
bindAddr = InetAddress.ANY_IF; |
166 |
|
|
167 |
|
// create socket |
168 |
impl.create(true); |
impl.create(true); |
169 |
impl.bind(bindAddr, port); |
|
170 |
impl.listen(backlog); |
// bind to address/port |
171 |
|
try { |
172 |
|
impl.bind(bindAddr, port); |
173 |
|
} catch (IOException exception) { |
174 |
|
impl.close(); |
175 |
|
throw exception; |
176 |
|
} catch (RuntimeException exception) { |
177 |
|
impl.close(); |
178 |
|
throw exception; |
179 |
|
} catch (Error error) { |
180 |
|
impl.close(); |
181 |
|
throw error; |
182 |
|
} |
183 |
|
|
184 |
|
// listen on socket |
185 |
|
try { |
186 |
|
impl.listen(backlog); |
187 |
|
} catch (IOException exception) { |
188 |
|
impl.close(); |
189 |
|
throw exception; |
190 |
|
} catch (RuntimeException exception) { |
191 |
|
impl.close(); |
192 |
|
throw exception; |
193 |
|
} catch (Error error) { |
194 |
|
impl.close(); |
195 |
|
throw error; |
196 |
|
} |
197 |
} |
} |
198 |
|
|
199 |
/** |
/** |