Results 1 to 9 of 9
  1. #1
    rbangar is offline Member
    Join Date
    Jan 2012
    Posts
    5
    Rep Power
    0

    Post Implementing Client-Server

    Hello all,
    I want to implement simple client - server application using http.The application is stand alone application and not web application.
    I don't want to use socket concept as it doesn't allows multiple client requests.
    plz help me.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,587
    Rep Power
    25

    Default Re: Implementing Client-Server

    I don't want to use socket concept as it doesn't allows multiple client requests.
    Please explain why you think this is true.

  3. #3
    rbangar is offline Member
    Join Date
    Jan 2012
    Posts
    5
    Rep Power
    0

    Default Re: Implementing Client-Server

    I have read that SOCKET's are used for peer to peer(1 to 1) communication.
    plz let me know if I am wrong.

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,587
    Rep Power
    25

    Default Re: Implementing Client-Server

    I was considering ServerSocket and Socket as both being sockets. One is used by the server and the other by the client.
    You can use them for peer to peer or client-server.

  5. #5
    rbangar is offline Member
    Join Date
    Jan 2012
    Posts
    5
    Rep Power
    0

    Default Re: Implementing Client-Server

    Yes very true but the concern is whether server socket responds to multiple clients at a time??

  6. #6
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,587
    Rep Power
    25

    Default Re: Implementing Client-Server

    Not at the same time, serially one after the other. I don't know what the delay between connect is, less than a millisecs? or how the underlying software queues incoming requests until the serversocket is available.

    Each connect would be passed to a thread to handle. The limit on concurrent clients would be determined by how many threads you can have running concurrently.

  7. #7
    rbangar is offline Member
    Join Date
    Jan 2012
    Posts
    5
    Rep Power
    0

    Default Re: Implementing Client-Server

    Is there any alternative to socket for this particular problem??
    Using http get and post methods used in web applications.

  8. #8
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,587
    Rep Power
    25

    Default Re: Implementing Client-Server

    The communications of data is handled by sockets. HTTP is a protocol that uses sockets.
    The other choice is Datagrams. They use a more primitive type of socket without the care and tending of the TCP layer of software to keep packets in order and ensure delivery.

    There are several code examples on the forum. Do a Search for ServerSocket to see some of them.

  9. #9
    rbangar is offline Member
    Join Date
    Jan 2012
    Posts
    5
    Rep Power
    0

Similar Threads

  1. Replies: 6
    Last Post: 01-09-2012, 10:30 PM
  2. Replies: 2
    Last Post: 09-24-2010, 12:31 PM
  3. Replies: 1
    Last Post: 10-05-2008, 04:12 PM
  4. Identify Client in Socket Client Server Application
    By masadjie in forum Networking
    Replies: 1
    Last Post: 12-20-2007, 10: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
  •