Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Raspberry Pi / Having issues with network on raspberry pi 3

Author
Message
sovsov
1
Years of Service
User Offline
Joined: 11th Nov 2015
Location:
Posted: 3rd Aug 2016 02:05
Hello everyone! I am having this weird issue with not being able to setup a network. Here is the error message:

+ Code Snippet

and here is my code:

+ Code Snippet

I will say it is not the best code in the world, but I am building a basic communication app between my computer and raspberry pi, thank you for your help and suggestions!
BatVink
Moderator
14
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 3rd Aug 2016 08:23
You aren't checking if you are connected, which can take a few seconds...

JoinNetwork()
This function does not connect immediately, it returns a network ID and continues to attempt to connect in the background. You can detect when a connection is made by checking that GetNetworkNumClients is greater than 1. This app itself is included in the client count, and the host also counts as a client. If IsNetworkActive returns 0 at any time then the connection to the server failed and the network should be closed, you may attempt to reconnect by opening a new network.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt

Login to post a reply

Server time is: 2017-08-22 09:59:35
Your offset time is: 2017-08-22 09:59:35