Coder Social home page Coder Social logo

multicast's Introduction

big data multicast

大数据组播工具,内部实现好拆包装包算法.使用该工具可直接发送大数据包和接收.几行代码就搞定!

如何开始?

1.把 multicast-1.0.jar 添加到您项目的classpath中去.

2.编写一个类实现 MessageHandler 接口

3.使用TiandeMulticastSocket关键类开启组播服务:

MyMessageHandler handler = new MyMessageHandler();

TiandeMulticastSocket tiandeMulticastSocket = new TiandeMulticastSocket();
tiandeMulticastSocket.setGroup("228.0.0.10");
tiandeMulticastSocket.setIntervalSend(0);
tiandeMulticastSocket.setReceiveTimeOut(2000);
tiandeMulticastSocket.setBlockMaxSize(1024 * 50);
tiandeMulticastSocket.setReceivePacketSize(1024 * 60);	
tiandeMulticastSocket.registerHandler(handler);
tiandeMulticastSocket.start();

4.发送组播消息:

TiandeMulticastMessage msg = new TiandeMulticastMessage();
msg.setMethod("register");
msg.setProperty("key", "value");
msg.setBody("Hello a big data now");
tiandeMulticastSocket.send(msg);

multicast's People

Contributors

lmd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.