Created
July 21, 2020 18:57
-
-
Save cmol/901169b22a84d8c4e5cc0c1f9c84b520 to your computer and use it in GitHub Desktop.
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
require "socket" | |
LISTEN_ADDR = "::" | |
LISTEN_PORT = 12345 | |
MSG_LENGTH = 256 | |
FLAGS = 0 | |
# Create socket and bind it to the listen on all addresses and the given port | |
server_socket = UDPSocket.new :INET6 | |
server_socket.bind(LISTEN_ADDR, LISTEN_PORT) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment