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 4 of 4

Thread: LWJGL multiplayer server help

  1. #1
    Junior Member
    Join Date
    Sep 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default LWJGL multiplayer server help

    Hello Java community!

    My name is Brandon and i need help figuring out how to do a server for my game. My problem is when i try to make a loop for my client i have to close the socket i used to send the string and that works if i recreate the socket but after i close it i cant receive anything from the server.

    So my question is what should i do? Should i try running another socket in its own instance or run two sockets at one time? but from what i understand about running two sockets is they would have to run on separate ports but i know that doesn't seem very resourceful or clean.

    Anyways going back to the main question. How would i make a client and server that runs in a loop without having to destroy the sockets. if I'm doing it wrong and should not be running it in a loop at all or something like that please let me know.

    Thank You, Brandon

    PS, I'm not posting the code because i am absolutely sure it is worthless. I'm kinda a newb at this network stuff in java


  2. #2
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 263 Times in 232 Posts

    Default Re: LWJGL multiplayer server help

    Double posted here
    Please do not double post your question(s).

  3. #3
    Junior Member
    Join Date
    Aug 2012
    Location
    Germany
    Posts
    19
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default Re: LWJGL multiplayer server help

    Why does your client "need" to close the socket?

  4. #4
    Junior Member
    Join Date
    Sep 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: LWJGL multiplayer server help

    well i guess i should re-word but it does not need to close the socket it just wont send the string if i don't

Similar Threads

  1. LWJGL multiplayer server help
    By Brandon_Lengefeld in forum Java Networking
    Replies: 1
    Last Post: September 7th, 2012, 11:24 PM
  2. [SOLVED] Edge of screen detection in LWJGL + SSCCE
    By Tjstretch in forum Java Theory & Questions
    Replies: 1
    Last Post: August 14th, 2012, 06:35 PM
  3. GL11 quad not showing in LWJGL Display
    By squeakbox in forum What's Wrong With My Code?
    Replies: 0
    Last Post: May 9th, 2012, 02:26 PM
  4. LWJGL texture applying problem
    By DanielJamesCollier in forum What's Wrong With My Code?
    Replies: 4
    Last Post: April 16th, 2012, 01:45 PM
  5. [SOLVED] Problem with OpenGL via LWJGL
    By paulo.carabuena in forum What's Wrong With My Code?
    Replies: 1
    Last Post: December 6th, 2011, 02:52 PM