Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
chain33-pai
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
szh
chain33-pai
Commits
7d5fa08e
Commit
7d5fa08e
authored
Jun 28, 2020
by
szh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add wlan0 and eth0 net ip
parent
d7b8d132
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
main.go
main.go
+5
-1
No files found.
main.go
View file @
7d5fa08e
...
...
@@ -96,8 +96,12 @@ func broadcast() {
//ip 会变化
ip
,
err
:=
util
.
GetLocalIpByName
(
"wlan0"
)
if
err
!=
nil
{
if
err
!=
nil
||
ip
==
nil
{
tlog
.
Error
(
"broadcast"
,
err
)
ip
,
err
=
util
.
GetLocalIpByName
(
"eth0"
)
if
err
!=
nil
{
panic
(
err
)
}
}
// 这里设置发送者的IP地址,自己查看一下自己的IP自行设定
laddr
:=
net
.
UDPAddr
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment