/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 2001 by Sun Microsystems, Inc.
* All rights reserved.
*
*/
// StreamListener.java: Listen to stream socket, spawn request to
// handle incoming request.
// Author: James Kempf
// Created On: Mon May 18 13:31:40 1998
// Last Modified By: James Kempf
// Last Modified On: Tue Jan 12 11:03:30 1999
// Update Count: 24
//
/**
* Listen on the SLP port for clients requesting a stream connection. Spawn
* a request handler to handle the connection.
*
* @author James Kempf, Erik Guttman
*/
// Initialize a stream (TCP) listener on an interface.
throws ServiceLocationException {
// If we've got it, return.
return;
}
// Get config object.
}
// Create the new stream listener.
// Start it running.
}
throws ServiceLocationException {
// Create a server socket for incoming Stream connections.
try {
qn,
interfac);
} catch (IOException ex) {
throw new ServiceLocationException(
"socket_creation_failure",
}
// Record.
}
// Listen to port 427, accept incoming connections, pass the socket
// off to a new RequestHandler to process.
public void run() {
setName("SLP Stream Listener");
long lLastIOE = 0;
// Loop, blocking on acceptence of connections.
while (true) {
try {
new Object[] {
s.getInetAddress().toString(),
interfac});
}
// Set socket timeout in case something goes wrong.
if (s != null) {
}
} catch (SocketException ex) {
new Object[] {
s.getInetAddress().toString(),
ex.getMessage()});
}
continue;
} catch (IOException ex) {
"sls_repeat_failure",
new Object[0]);
continue;
}
}
}
}