GithubHelp home page GithubHelp logo

node-raknet's People

Contributors

mhsjlw avatar rom1504 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-raknet's Issues

Elixir implementation?

I know this isn't the proper forum for this, and I apologize for that... but for the life of me I couldn't figure out any other means of contacting @mhsjlw.

A couple years ago, you had an elixir-raknet library, but it appears to have disappeared from the internets. Do you by chance have an archive of it lying around? I'm working on an Elixir RakNet client now, and would be very grateful to get a head start, even if your project was killed before being production-grade.

Tests

12:53 also we should think about writing raknet tests at some point
12:53 like circle ci builds a copy of chat server and our client tried to connect to it
12:53 and it it get's past handshake the test passes
12:54 then we get a node-raknet server and see if the client can connect
12:54 then the test passes

remove magic values

There are still a few hardcoded values in the code. It works so it's not a big deal but better generate them properly (example : serverid)

split/merge encapsulated packet content

Example:

{"seqNumber":7,"encapsulatedPackets":[{"reliability":3,"hasSplit":16,"length":1432,"messageIndex":6,"orderIndex":1,"orderChannel":0,"splitCoun
                t":12,"splitID":0,"splitIndex":4

client example

23:07 < javaprophet> Set bind-port to 0, and it will act like TCP, where the Os automatically sets that up.

Sending wrong password

Got the following code:

const RakNet = require('node-raknet')

const client = RakNet.createClient({
    host: '128.116.65.156',
    port: 50945,
    mtuSize: 1156,
    password: "374f5e116c45"
})

client.on('connect', function () {
    console.info('Connected')
})

client.on('login', () => {
    console.log('Logged in')
})

client.on('error', function (err) {
    console.log(err)
})

client.on('data', function (data) {
    console.log(data)
})

Password is set to 374f5e116c45. But when I monitor packages using Wireshark it says RakNet Password: 333734663565313136633435. And that's not the password Ive send through.

This is what's shown in the HEX dump + ascii dump:

33 37 34 66 35 65 31 31 36 63 34 35   374f5e116c45

But it's just weird that it shows what's the value of the HEX dump instead of the actual password.

20 is not in the mappings value

Hi,

I'm using the following repository: https://github.com/mhsjlw/node-raknet which uses Protodef. I've got the following error:

Error: Deserialization error for  : Read error for name : 20 is not in the mappings value
    at ProtoDef.readMapper (C:\Users\AaronJ\Documents\Raknet.js\node_modules\protodef\src\datatypes\utils.js:30:34)
    at ProtoDef.read (C:\Users\AaronJ\Documents\Raknet.js\node_modules\protodef\src\protodef.js:110:29)
    at C:\Users\AaronJ\Documents\Raknet.js\node_modules\protodef\src\datatypes\structures.js:45:32
    at tryCatch (C:\Users\AaronJ\Documents\Raknet.js\node_modules\protodef\src\utils.js:50:16)
    at tryDoc (C:\Users\AaronJ\Documents\Raknet.js\node_modules\protodef\src\utils.js:54:10)
    at C:\Users\AaronJ\Documents\Raknet.js\node_modules\protodef\src\datatypes\structures.js:44:5
    at Array.forEach (<anonymous>)
    at ProtoDef.readContainer (C:\Users\AaronJ\Documents\Raknet.js\node_modules\protodef\src\datatypes\structures.js:43:12)
    at ProtoDef.read (C:\Users\AaronJ\Documents\Raknet.js\node_modules\protodef\src\protodef.js:36:25)
    at ProtoDef.read (C:\Users\AaronJ\Documents\Raknet.js\node_modules\protodef\src\protodef.js:110:29)
    at e.message (C:\Users\AaronJ\Documents\Raknet.js\node_modules\protodef\src\protodef.js:149:49)
    at tryCatch (C:\Users\AaronJ\Documents\Raknet.js\node_modules\protodef\src\utils.js:50:16)
    at ProtoDef.parsePacketBuffer (C:\Users\AaronJ\Documents\Raknet.js\node_modules\protodef\src\protodef.js:149:29)
    at Parser.parsePacketBuffer (C:\Users\AaronJ\Documents\Raknet.js\node_modules\protodef\src\serializer.js:36:23)
    at Parser._transform (C:\Users\AaronJ\Documents\Raknet.js\node_modules\protodef\src\serializer.js:44:23)
    at Parser.Transform._read (C:\Users\AaronJ\Documents\Raknet.js\node_modules\readable-stream\lib\_stream_transform.js:177:10)
    at Parser.Transform._write (C:\Users\AaronJ\Documents\Raknet.js\node_modules\readable-stream\lib\_stream_transform.js:164:83)
    at doWrite (C:\Users\AaronJ\Documents\Raknet.js\node_modules\readable-stream\lib\_stream_writable.js:409:139)
    at writeOrBuffer (C:\Users\AaronJ\Documents\Raknet.js\node_modules\readable-stream\lib\_stream_writable.js:398:5)
    at Parser.Writable.write (C:\Users\AaronJ\Documents\Raknet.js\node_modules\readable-stream\lib\_stream_writable.js:307:11)
    at Client.handleMessage (C:\Users\AaronJ\Documents\Raknet.js\node_modules\node-raknet\src\client.js:190:17)
    at Socket.<anonymous> (C:\Users\AaronJ\Documents\Raknet.js\node_modules\node-raknet\src\createClient.js:25:12)
    at Socket.emit (events.js:215:7)
    at UDP.onMessage [as onmessage] (dgram.js:861:8) {
  field: '',
  buffer: <Buffer 14>
}

Where when I go to line 30 of node_modules\protodef\src\datatypes\utils.js, I see the following code:

if (mappedValue == null) throw new Error(value + ' is not in the mappings value')

Any fix for not finding 20?
It also happens with 24

Connection sequence

For both the client and the server (in createClient and createServer):

  • open_connection_request_1
  • open_connection_reply_1
  • open_connection_request_2
  • open_connection_reply_2
  • client_connect
  • server_handshake
  • client_handshake

Emit the correct event when the sequence is done.

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.