Giter Site home page Giter Site logo

nettyrpc's Issues

{.networked.} procedures (not direct sends) send data to the connection that called the RPC

Check the example here:

https://github.com/RattleyCooper/nettyrpc-1/tree/examples/example/authoritativeChatClient

The client displays it's own chat message as if it came from another person:

# client.nim
proc display_chat(name, message: string) {.networked.} =
  ## Display chat message from the server.
  eraseLine()
  echo fmt"{getClockStr()} {name} says: {message}"

proc send_chat(name, msg: string) =
  # If you want client actions to take place instantly, create a procedure 
  # to handle client-side logic and then dispatch the RPC.
  eraseLine()
  echo fmt"{getClockStr()} You said: {msg}"
  rpc("send_chat", (name: name, msg: msg))

it should call the rpc on other clients, but it is sent to the caller of the rpc as well. If you send a chat you will see both messages in the chat.

Pong example not properly working

Allows a user to join and will send the name, but the paddle does not update position, could possibly be because the new relayed logic does not check the source of the packet and sends it to everyone, needs to be investigated and fixed.

After further testing seems to be purely random what works, sometimes ball will not sync, othertimes paddle.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.