Connectivity - Overview
[SOCL-Connectivity-01]
<HTMLBlock>{`
<ul class="breadcrumb">
<li><a href="/docs/">Docs</a></li>
<li><a href="/docs/social-networking">Social & Networking</a></li>
<li><a href="/docs/connectivity-feature-overview">Connectivity</a></li>
<li>Connectivity - Overview</li>
</ul>
<div class="links">
<a class="link active" href="/docs/connectivity-feature-overview" style="text-decoration: none">Overview</a>
<a class="link normal" href="/docs/connectivity-code" style="text-decoration: none">Code</a>
</div>
`}</HTMLBlock>
The Connectivity drives the heartbeat sent back to the Beamable backend platform. If the game client loses connectivity, the heartbeat will stop and the Beamable API will gracefully wait for reconnection before resuming the full online feature-set.
The system monitors internet connectivity and updates automatically if any changes occur; including remote server outages or loss of local ethernet/Wi-Fi internet.
## API
Unlike many Beamable <Glossary>Feature</Glossary>s, Connectivity does not require a specific Beamable <Glossary>Feature Prefab</Glossary> to be used. The main entry point to this feature is C# programming.
{user.TXT_API_HIGHLIGHTS} <a href="https://csharp.cdocs.beamable.com/latest/classBeamable_1_1Api_1_1Connectivity_1_1ConnectivityService.html#details" target="_blank">`ConnectivityService`</a>.
<HTMLBlock>{`
<style>
/* Column #1 within tables */
.markdown-body table td:nth-child(1)
{
width:330px !important;
min-width:330px !important;
max-width:330px !important;
}
/* Column Last within tables */
.markdown-body table td:last-child
{
width:100% !important;
}
</style>
`}</HTMLBlock>
<Table align={["left","left"]}>
<thead>
<tr>
<th>
Method Name
</th>
<th>
Detail
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
HasConnectivity
</td>
<td>
Getter. Determines if the app has internet connectivity
</td>
</tr>
<tr>
<td>
SetHasInternet
</td>
<td>
Setter. Determines if the app has internet connectivity
*Note: Calling this is not required. The Beamable system will properly monitor connectivity and update the ConnectivityService.*
</td>
</tr>
</tbody>
</Table>
<HTMLBlock>{`
<style>
.links {
padding: 0 1em 1em 0;
display: flex;
flex-flow: row wrap;
}
.link {
margin-right: 2em;
padding: 0.3em 1.5em;
box-sizing: border-box;
}
.active {
border: 1px solid #4274f6;
background-color: #4274f6;
color: white;
}
.normal {
background-color: white;
border: 1px solid gray;
cursor:pointer;
text-decoration: none;
}
.normal:active {
background-color: #c4d4ff;
}
.normal:hover {
background-color: #c4d4ff;
}
.active:active {
color: white;
}
.active:hover {
color: white;
}
ul.breadcrumb {
padding: 10px 16px;
list-style: none;
}
ul.breadcrumb li {
display: inline;
font-size: 18px;
}
ul.breadcrumb li+li:before {
padding: 8px;
color: black;
content: "/\00a0";
}
ul.breadcrumb li a {
color: #0275d8;
text-decoration: none;
}
ul.breadcrumb li a:hover {
color: #01447e;
text-decoration: underline;
}
@media only screen and (max-width:700px){
ul.breadcrumb {
padding-top:0;
padding-left:0;
}
.link {
margin-right: 1em;
margin-bottom:1em;
}
}
</style>
`}</HTMLBlock>Updated 2 months ago
