Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9267261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T14:30:37+00:00 2026-06-18T14:30:37+00:00

I am writing a networked multi player game where players use their own client

  • 0

I am writing a networked multi player game where players use their own client and server handles all the data processing…

I have finished writing for the game with one server.

What I want to do is, I will have a main server which will send information about different game rooms and players will be able to connect to the game room they want.

What I have in mind is if player click set up new game room, the client will tell server to set up new game which will create a new server and add the information about that server to the main server.

I am keeping secondary servers as ArrayList…

String line = in.nextLine();

if (line.equalsIgnoreCase("new game")) {
servers.add(new SecondaryServers(secondaryPort)); // starting secondary server
secondaryPort++; // this is to keep track of port number
System.out.println(i + " secondary server(s) started"); // printout in main server's console
 }

When I do it that way, it started a new server at the first time, but it never goes to the state to print out to the console.

Please help me out to create new servers from the main one 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T14:30:38+00:00Added an answer on June 18, 2026 at 2:30 pm

    I think there is a ServerSocket.accept() method is called from within SecondaryServers. accept() is a blocking method so you should start SecondaryServers in a new Thread.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently writing a multi-process network game server (one gatekeeper process which tells players
I am writing a small multi-threaded network server. All classical stuff: it listens for
I am writing a networked game client and having problems when changing between frames
I have started writing my own WebDAV server class in .NET, and the first
I'm writing a 2D space RTS game in C#. Single player works. Now I
Abstract Syntax Notation I'm in the process of writing a network client and server,
I'm writing a networked game in C++ using Winsocks 2.2, using Visual Studio 2010,
I am trying to make a multi-player network game. Each player is represented by
I am writing a networked application in Java, to communicate between the client and
I am writing an Android application which can enable and disable the Network Data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.