Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 1 of 1

Thread: TCP Socket connection sometimes takes several seconds

  1. #1
    Junior Member
    Join Date
    Mar 2019
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default TCP Socket connection sometimes takes several seconds

    Hi all, I have server/client application. The server is waiting with a serverSocket.accept(), once I do the new Socket (...), most of times the connection is established immediatelly, but sometimes it takes up to 12 seconds to be established. I am only considering the time of invoking new Socket (...) on the client side. I am pretty sure the server is free and waiting.

    My Server just accepts a connections and immediatelly creates a Thread to attend what the client asks and returns to accept again. The client only does very fast and light operations.

    PD: The client is an android tablet and the server is a PC.
    Last edited by Melssj5; March 27th, 2019 at 03:48 PM.

Similar Threads

  1. TCP Java Socket Server
    By vviston in forum Java Networking
    Replies: 3
    Last Post: March 24th, 2014, 05:36 AM
  2. Replies: 12
    Last Post: September 3rd, 2011, 07:07 AM
  3. Replies: 0
    Last Post: February 24th, 2011, 06:31 AM
  4. windowsize TCP socket
    By ra65ma in forum Java Networking
    Replies: 0
    Last Post: January 29th, 2011, 12:58 PM
  5. multiple tcp connection?
    By nasser in forum Java Networking
    Replies: 4
    Last Post: July 31st, 2010, 07:35 AM