Results 1 to 3 of 3
  1. #1
    lkcz is offline Member
    Join Date
    Sep 2010
    Posts
    5
    Rep Power
    0

    Question server-client; client sends a username to the server.

    I have reformed my server code, but the only thing that I am not sure about is how the server would get a selected name from the client?
    would I just have to create a protocol and states for the accounts?

    say the person was new and types name in to use from the client, how could I get the client to send the name to the server?

    state 1
    check if the name exists
    if true go to state 3 and log in

    state 2 create account..

    by using bufferedreader and writer, but is there another more efficient way?

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,317
    Rep Power
    25

    Default

    how the server would get a selected name from the client?
    how could I get the client to send the name to the server
    The client would connect to the server and send the name to the server.
    How does the client connect to the server?
    Do you have a protocol for client-server communications? Are you sending Strings or using DataStreams or ?

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by lkcz View Post
    I have reformed my server code, but the only thing that I am not sure about is how the server would get a selected name from the client?
    Why don't you look at how the communication take place between server-client.

Similar Threads

  1. FTP client server
    By toxic in forum Networking
    Replies: 1
    Last Post: 05-04-2010, 04:54 AM
  2. Replies: 3
    Last Post: 07-29-2009, 04:52 AM
  3. client-server app
    By shwein in forum Networking
    Replies: 3
    Last Post: 10-14-2008, 05:20 PM
  4. Replies: 1
    Last Post: 10-05-2008, 03:12 PM
  5. Identify Client in Socket Client Server Application
    By masadjie in forum Networking
    Replies: 1
    Last Post: 12-20-2007, 09:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •