This file contains hidden or 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
# to run: | |
# > elixir --no-halt udp_server.exs | |
# to test: | |
# > echo "hello world" | nc -u -w0 localhost 2052 | |
# > echo "quit" | nc -u -w0 localhost 2052 | |
# Let's call our module "UDPServer" | |
defmodule UDPServer do | |
# Our module is going to use the DSL (Domain Specific Language) for Gen(eric) Servers | |
use GenServer |
This file contains hidden or 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
geo $limited { | |
default 1; | |
# Wordpress Jetpack ranges: | |
192.0.0.0/16 0; | |
66.135.0.0/16 0; | |
66.155.0.0/16 0; | |
76.74.0.0/16 0; | |
} |