server

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2018 License: MIT Imports: 8 Imported by: 1

README

Arcadeum Server

Usage / Dev

  1. Install Go v1.9+
  2. Install Redis; have it run on the default port (6379)
  3. make tools
  4. make bootstrap
  5. make run

Deploy to staging

Staging deploys will push to https://relay.arcadeum.com and point to rinkeby testnet.

  1. Build docker image
sup staging build
  1. Pull & run docker containers
sup staging deploy

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OnMessage

func OnMessage(ws *websocket.Conn, messages chan *matcher.Message)

Types

type MessageRequest

type MessageRequest struct {
	PlayerConn *websocket.Conn // sender
	*matcher.Message
}

type Server

type Server struct {
	Matcher *matcher.Service
}

func New

func New(cfg *config.Config) (*Server, error)

func (*Server) FindMatch

func (s *Server) FindMatch(token *matcher.Token, conn *websocket.Conn)

func (*Server) HandleConnections

func (s *Server) HandleConnections(w http.ResponseWriter, r *http.Request)

func (*Server) HandleMessages

func (s *Server) HandleMessages()

func (*Server) Start

func (s *Server) Start() error

Directories

Path Synopsis
cmd
lib

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL