• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

void dashboardPage(EthernetClient &client)

Q&A Forum › Category: Arduino › void dashboardPage(EthernetClient &client)
0 Vote Up Vote Down
fahadman asked 4 years ago

can you please explain this line of code in details “void dashboardPage(EthernetClient &client)” thanks

Question Tags: ethernet webserver
5 Answers
0 Vote Up Vote Down
Rui Santos Staff answered 4 years ago

Can you just remind me where that code comes from? Which Course and Module/Unit? (Or post the link to my Github code)
Thanks!

0 Vote Up Vote Down
fahadman answered 4 years ago

it’s in Ethernet Web Server (Relay + Temperature) project inside Arduino Step-by-step Projects Course

0 Vote Up Vote Down
Rui Santos Staff answered 4 years ago

Got it, thanks! Basically this is how you declare a function:

void dashboardPage(EthernetClient &client) {
  // your function
}
  • void – means that your function doesn’t return any value (it only performs a certain action)
  • dashboardPage() – it’s the function name that you use too call it
  • EthernetClient &client – you pass the client connection as a parameter
  • // your function – where you place your code to run when you call that function (in this case it send the HTML page/dashboard to the connected client)

I hope that helps!

0 Vote Up Vote Down
fahadman answered 4 years ago

thanks a lot i only didnt get why you use & in this code what is the advantage of that operator &

0 Vote Up Vote Down
Rui Santos Staff answered 4 years ago

That “&” returns the address (in physical memory) of the client variable.

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] SMART HOME with RPi, ESP32, and ESP8266 (version 1.2) March 8, 2023
  • [eBook Updated] ESP32-CAM Projects (version 1.3) January 7, 2023

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2023 · RandomNerdTutorials.com · All Rights Reserved

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.