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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:49:25+00:00 2026-06-04T21:49:25+00:00

Hello i’ve just picked up sockets for the first time and im using this

  • 0

Hello i’ve just picked up sockets for the first time and im using this tutorial to learn the basic steps….

http://www.linuxhowtos.org/C_C++/socket.htm

Everything seems to work fine so far, but my problem is im unsure of how to get my hostname to connect to the server from the client. Is there a way i can output the hostname on the server side ?

  • 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-06-04T21:49:27+00:00Added an answer on June 4, 2026 at 9:49 pm

    By definition, the client isn’t connected to the server until you connect them. So, for the client to discover the identity of the server, you have to use some other protocol. The common, simple, case, is of course DNS. You create a DNS entry for myservice.mydomain.com and let the client look it up.

    There are other service discovery protocols out there if your client can’t ‘know a name’, such as Bonjour. The general class of protocol here is described on Wikipedia under

    http://en.wikipedia.org/wiki/Zero_configuration_networking

    If everyone is on the same machine, then the hostname is the literal string ‘localhost’, which maps to IP 127.0.0.1.

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

Sidebar

Related Questions

Hello fellow developers... just to make sure, I want to ask this question: How
Hello again stackoverflow! So i build this script: <?php $xmlurl = 'http://api.ipinfodb.com/v2/ip_query.php?key=apikey&ip=127.0.0.100&timezone=false'; $xml =
Hello I was writing a Regular Expression (first time in my life I might
Hello I am using LibXML to parse an rss feed and I am wondering
Hello everyone I am trying to resize an image of 700kb with imagecreatefromjpeg. This
Hello I am trying to save a bitmap image in a basic image editor
Hello good fellas i'm sure everybody is cool.I'm about to start a tutorial about
Hello! I'm not even sure if this is possible, but hopefully it is in
Hello I have been having trouble with this for a while now. I have
Hello Guys I am trying to figure out why i am gettings this error

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.