170 |
} |
} |
171 |
|
|
172 |
/** |
/** |
173 |
|
* Binds the server socket to a specified socket address |
174 |
|
* |
175 |
|
* @param endpoint The socket address to bind to |
176 |
|
* |
177 |
|
* @exception IOException If an error occurs |
178 |
|
* @exception IllegalArgumentException If address type is not supported |
179 |
|
* @exception SecurityException If a security manager exists and its |
180 |
|
* checkListen method doesn't allow the operation |
181 |
|
* |
182 |
|
* @since 1.4 |
183 |
|
*/ |
184 |
|
public void bind (SocketAddress endpoint) |
185 |
|
throws IOException |
186 |
|
{ |
187 |
|
} |
188 |
|
|
189 |
|
/** |
190 |
|
* Binds the server socket to a specified socket address |
191 |
|
* |
192 |
|
* @param endpoint The socket address to bind to |
193 |
|
* @param backlog The length of the pending connection queue |
194 |
|
* |
195 |
|
* @exception IOException If an error occurs |
196 |
|
* @exception IllegalArgumentException If address type is not supported |
197 |
|
* @exception SecurityException If a security manager exists and its |
198 |
|
* checkListen method doesn't allow the operation |
199 |
|
* |
200 |
|
* @since 1.4 |
201 |
|
*/ |
202 |
|
public void bind (SocketAddress endpoint, int backlog) throws IOException |
203 |
|
{ |
204 |
|
} |
205 |
|
|
206 |
|
/** |
207 |
* This method returns the local address to which this socket is bound |
* This method returns the local address to which this socket is bound |
208 |
* |
* |
209 |
* @return The socket's local address |
* @return The socket's local address |
260 |
*/ |
*/ |
261 |
public Socket accept () throws IOException |
public Socket accept () throws IOException |
262 |
{ |
{ |
263 |
|
if (impl == null) |
264 |
|
throw new IOException ("Cannot initialize Socket implementation"); |
265 |
|
|
266 |
|
SecurityManager sm = System.getSecurityManager (); |
267 |
|
if (sm != null) |
268 |
|
sm.checkListen (impl.getLocalPort ()); |
269 |
|
|
270 |
Socket s = new Socket(); |
Socket s = new Socket(); |
271 |
implAccept (s); |
implAccept (s); |
272 |
|
|