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

  • Home
  • SEARCH
  • 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 684295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:48:04+00:00 2026-05-14T01:48:04+00:00

We create a socket. On one side of the socket we have a server

  • 0

We create a socket. On one side of the socket we have a “server” and on another side there is a “client”. Both, the server and client, can write to and read from the socket. It is what i understand. I do not understand the following things:

  1. If a server reads from the socket, does it see in the socket only those stuff which was written to the socket by the client? I mean if server writes something to the socket and than reads from the socket, will it (server) see in the socket the stuff it (server) wrote there? I hope not.

  2. Let’s consider the following situation. A client write something to the socket and then it writes something new to the socket and then server reads from the socket. What will the server see there? Only the “new” stuff written by the client or both “new” and “old” one?

  3. If a client (or server) writes to the socket, can it see if the written information was received by other side? For example out.println("Hello, Server!") will return true it server received this message.

  • 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-05-14T01:48:04+00:00Added an answer on May 14, 2026 at 1:48 am

    A socket connection represents two unidirectional streams: one from the client to the server and one from the server to the client.

    Each side can put data into one stream and read from the other.

    Data put into one stream is appended to the end of the data thats already there.

    When data is read from one end of the stream, the oldest data available will be read (i.e. it a stream is a FIFO).

    These statements should enable you to answer all your questions, but I’ll make it explicit as well:

    1. The server will only read what the client wrote, and not what it wrote itself
    2. The server will read the old stuff first and then the new stuff
    3. The client has no immediate way of knowing if the data was actually received by the other side, unless the server sends something in response. In some conditions it can know if sending failed (for example when there’s a physical problem on the side of the client), but generally can’t rely on that notification being there.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 437k
  • Answers 437k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Whilst having a contemplative stroll I have solved my own… May 15, 2026 at 4:24 pm
  • Editorial Team
    Editorial Team added an answer In answer to my own question, it's because DECIMAL_SEPARATOR is… May 15, 2026 at 4:24 pm
  • Editorial Team
    Editorial Team added an answer Greg's answer is correct. However you have to rearrange your… May 15, 2026 at 4:24 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.