nanojs

package module
v0.0.0-...-3d7ba13 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: MIT Imports: 2 Imported by: 0

README

gopherjs-nano | nanojs

simple gopherjs wrapper for the nano golang game framework client sdk

IMPORTANT

DO NOT INCLUDE NANO (STARX) CLIENT SIDE, THIS LIBRARY WILL AUTO INJECT THE CLIENT SDK

web app /example

EXAMPLE

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NanoJS

type NanoJS struct {
	*js.Object
}

func New

func New() *NanoJS

func (*NanoJS) Init

func (njs *NanoJS) Init(opts *Opts)

Init -- cb IS WHERE TO INIT ALL CLIENT NANO FUNCTIONALITY

func (*NanoJS) On

func (njs *NanoJS) On(msgKey string, cb func(map[string]interface{}))

On --

func (*NanoJS) Request

func (njs *NanoJS) Request(reqKey string, data interface{}, cb func(data map[string]interface{}))

Request --

type Opts

type Opts struct {
	Host         string // `js:"host"`
	Port         int    // `js:"port"`
	Path         string // `js:"path"`
	CallbackFunc func() // `js:"cb"`
}

Directories

Path Synopsis
https://github.com/lonng/nano/tree/master/examples/demo/chat
https://github.com/lonng/nano/tree/master/examples/demo/chat
jscode

Jump to

Keyboard shortcuts

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