Giter VIP home page Giter VIP logo

pnet's People

Contributors

eitch avatar j0nm1 avatar pvdberg1998 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pnet's Issues

No build file

Would you welcome a PR with a gradle build file for this?

How to exchange packets between two clients?

Hi,

I have created one server and two clients.

Server:

server = new PlainServer();
server.setListener(new ServerListener());
server.start(10240);

Client 1:

client1 = new PlainClient();
client1.setClientListener(new ClientListener());
client1.connect("localhost", 10240);

Client 2:

client2 = new PlainClient();
client2.setClientListener(new ClientListener());
client2.connect("localhost", 10240);

I can send a packet from Client 1 to the Server with:

packet1 = new PacketBuilder(Packet.PacketType.Request).withInt(10).withString("test").withBoolean(true).build();
client1.send(packet1);

But I'm not sure on how send this packet to Client 2? ๐Ÿค”
(ServerListener() and ClientListener() are both an implementation of PNetListener)

Missing stack trace when printing exception

Hi, I had a pretty hard time to debug some code in my handlePacket method and I wonder if there is any reason why you are using e.getMessage() instead of just passing the exception to print the entire stack trace?
That would make things much easier to debug, so for example instead of
logger.error("Error in listener thread: {} : {}", e.getClass(), e.getMessage()); just use logger.error("Error in listener thread: {} : {}", e.getClass(), e);

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.