forked from yyyar/gobetween
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Basic udp protocol implementation yyyar#41
- Loading branch information
Showing
15 changed files
with
1,005 additions
and
328 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# @author Illarion Kovalchuk <[email protected]> | ||
# | ||
# Sample script for exec healthcheck of dns backends for udp protocol | ||
|
||
host=$1 | ||
port=$2 | ||
|
||
dig @"$host" -p "$port" +time=1 > /dev/null 2>&1 ; [[ "$?" == "0" ]] && echo -n 1 || echo -n 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* server.go - server | ||
* | ||
* @author Illarion Kovalchuk | ||
* @author Yaroslav Pogrebnyak <[email protected]> | ||
*/ | ||
|
||
package core | ||
|
||
import ( | ||
"../config" | ||
) | ||
|
||
/** | ||
* Server interface | ||
*/ | ||
type Server interface { | ||
|
||
/** | ||
* Start server | ||
*/ | ||
Start() error | ||
|
||
/** | ||
* Stop server and wait until it stop | ||
*/ | ||
Stop() | ||
|
||
/** | ||
* Get server configuration | ||
*/ | ||
Cfg() config.Server | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.