import java.io.IOException
import java.net.{InetAddress, ServerSocket}

object SingletonApp extends App {
  private val port = 65000

  try {
    val s = new ServerSocket(port, 10, InetAddress.getLocalHost)
  }
  catch {
    case _: IOException =>