Code Monkey home page Code Monkey logo

libgdx-udp-extension's Introduction

Hello! ๐Ÿ‘‹

About Me

  • ๐Ÿ‘จโ€๐Ÿ’ป Fluent in Python, C, C++, Java, and Javascript
  • ๐ŸŽ“ B.S. Computer Science & Economics, Rensselaer Polytechnic Institute (RPI)
  • ๐Ÿ’ป Linux

My resume

libgdx-udp-extension's People

Contributors

johnnyapol avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

pion3er

libgdx-udp-extension's Issues

Implementation and Documentation Issues

First, I realize this project is 3 years old and I also appreciate what you're doing here, so take these comments as constructive criticism. I was going to try this API, but I found too much inaccuracy in the documentation and API.

  • I've noticed some of your methods have inconsistent implementations. For example, look at the methods in class Packet. Some of them check for null on the input, others have side effects like calling close on input streams, others do not. Why?
  • Why do your methods (e.g. readDouble) return boxed types like Double when the underlying DataInputStream actually returns unboxed primitives?
  • Why do you refer to member objects with this alternatively within methods? Have a look at readDatagram, which doesn't at first and then does.
  • Your class UDPManager is arguably misnamed, as it isn't a UDP Manager at all. If anything, it's a single UDP socket manager, but it's hardly that. It's a place for the user to implement, so by java standards it's really a UDPFactory.

In the documentation, I take issue with improper reasons listed for throwing exceptions. For example, Packet::createDatagram claims to throw an IOException:

@throws IOException If there was an error retrieving the data */

But why is a method dedicated to creating datagrams doing any "retrieving of data"? If you look at the implementation, it actually isn't. It's calling flush on a DataOutputStream, so if anything, it's writing data.

I suggest you carefully review this file, as it contains many such inaccuracies which are confusing for someone trying to use this API.

Client constructor port is incorrectly documented

The port parameter is listed as The port of the server you want to connect to, in reality this should probably be a different port, otherwise both client and server cannot run on the same machine.

The server port should be provided as part of a datagram sent through the client.

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.