Giter Site home page Giter Site logo

udpsocketdemo's People

Contributors

itsmelo 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  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

udpsocketdemo's Issues

udp 例子

/**
 * 处理接受到的消息
 */
private void receiveMessage() {
    while (isThreadRunning) {
        try {
            if (client != null) {
                client.receive(receivePacket);
            }
            lastReceiveTime = System.currentTimeMillis();
            Log.d(TAG, "receive packet success...");
        } catch (IOException e) {
            Log.e(TAG, "UDP数据包接收失败!线程停止");
            stopUDPSocket();
            e.printStackTrace();
            return;
        }

跑起来项目发送是成功的 但是接收从来没收到过消息 请教下这个情况是?

请教一个问题

楼主:
你好! 最近刚好在做UDP相关的项目,有一个问题想请教你,DatagramSocket receive 方法放在子线程中,receive方法是阻塞的,如果长时间没有收到消息,系统可能会回收该子线程,如何处理这种情况呢?

UI界面显示异常,

UI界面显示和layout不一样,导致实际运行无法发送接受。

系统版本:Android 11

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.