question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question: What is the "Network" used for?

See original GitHub issue

I see in the examples:

// Set network and server
Network network = new Network("Test SDF Network ; September 2015");
Server server = new Server("https://horizon-testnet.stellar.org");
....

Or even:

Network.UseTestNetwork();
Server server = new Server("https://horizon-testnet.stellar.org");

I went over the Network class and can’t figure out what/where it is used for? Since we instantiate the Server with specific uri (test or main), where does the Network used? I can’t see its being used anywhere for example: examples/send_native_assets.md

Thanks 😃

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
fracekcommented, Sep 20, 2018

I think you have a good understanding of it. In the case of applications like wallets I think it makes sense to have a global object for the current network, but if you’re developing something else it’s probably better to use the overloaded Sign method. You’re also right about thread safety (I brought this exact same issue up in #104).

1reaction
Kirbyrawrcommented, Sep 20, 2018

Hi there i’m on my lunch time so i have time to reply to you.

A network is a cluster of servers connected between them in a decentralized way.

For connect to a network you need a passphrase. Think of it like a way to assign an ID

If you ask the server it will give you the details of the network it’s in, also it can give you the passphrase https://horizon-testnet.stellar.org (try to click and see on the bottom).

Here is more info: https://www.stellar.org/how-it-works/stellar-basics/explainers/

It’s a bit tricky though.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is a Computer Network? | Definition from TechTarget
A computer network is a group of interconnected nodes or computing devices that exchange data and resources with each other. A network connection...
Read more >
Chapter 1: What is a Network?
A network consists of two or more computers that are linked in order to share resources (such as printers and CDs), exchange files,...
Read more >
Top Networking Interview Questions (2023)
Find Networking interview questions asked. Explore basic, intermediate, and advanced level questions.
Read more >
5.1 Uses of networks
A network allows several people to be connected to one printer or scanner, thus making optimal use of these resources. Software: Networks also...
Read more >
Computer Network Interview Questions
Answer: A set of devices connected to each other over the physical medium is known as a computer network. For example, the Internet....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found