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 7586449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:25:57+00:00 2026-05-30T19:25:57+00:00

I understand that a TcpClient is a wrapper around the socket class, and I

  • 0

I understand that a TcpClient is a wrapper around the socket class, and I can access the underlying socket if using the TcpClient, but what exactly does the wrapper do?

When using the TCPClient do i need to keep calling Receive() like I do with a socket or does the wrapper ensure all my data appears?

Lastly, can I use the TcpClient on both the server and the client to wrap the socket (after using TcpListener to accept the original connection on the server)

  • 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-30T19:25:58+00:00Added an answer on May 30, 2026 at 7:25 pm

    what exactly does the wrapper do?

    Let me explain this with an example. You have a method in C# File.ReadAllLines. It reads all lines in the file for you. Now you can also achieve same results via FileStream class or any other class which reads file .. BUT.. wrapper i.e. File.ReadAllLines, allows you to achieve the same with less lines of code. Wrappers always increase productivity by abstracting out the low level details

    When using the TCPClient do i need to keep calling Receive() like I do
    with a socket or does the wrapper ensure all my data appears?

    TCPClient don’t have a Receive method like Socket but the idea is same. You will have to use methods like GetStream to read the data it won’t automagically appear for you

    Can I use the TcpClient on both the server and the client to wrap the
    socket

    Yes, you can safely use it on both client and server side

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I understand that PHP does not support multithreading but I would love to know
I understand that they are both supposed to be small, but what are the
I understand that requests are served by different threads, but do they all come
I understand that there is a *.className selector since there can be multiple html
I understand that you must copy blocks in order for them to stick around
I have a TcpClient object which sends some data to server, using its underlying
I understand that CGAffineTransformMakeRotation can rotate an image, and CGAffineTransformMakeTranslation translates an image. I
I understand that repr() 's purpose is to return a string, that can be
I am using TcpClient to communicate with a server that sends information in form
Cannot access a disposed object. Object name: 'System.Net.Sockets.TcpClient'. I don't understand why it happen

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.