Giter Club home page Giter Club logo

Comments (1)

kadoshita avatar kadoshita commented on June 11, 2024

Improve performance

graph TD
    Start --> HAS_STORED_CHANNEL_NUMBER_CHECK{Has stored Channel Number?};
    HAS_STORED_CHANNEL_NUMBER_CHECK --> |Yes| SEND_APP_DATA_TO_PEER[Send Application Data to peer];
    HAS_STORED_CHANNEL_NUMBER_CHECK --> |No| IS_RECEIVED_FROM_PEER{Is received from peer?};
    IS_RECEIVED_FROM_PEER --> |Yes| IS_CHANNEL_NUMBER_STORED_CHECK{Is channel number stored?};
    IS_CHANNEL_NUMBER_STORED_CHECK --> |Yes| SEND_CHANNEL_DATA_TO_CLIENT[Send Channel Data to client];
    IS_CHANNEL_NUMBER_STORED_CHECK --> |NO| SEND_DATA_INDICATE_TO_CLIENT[Send Data Indication to client];
    IS_RECEIVED_FROM_PEER --> |No| STUN_MESSAGE_CHECK{Is STUN Message?};    
    STUN_MESSAGE_CHECK --> |Send Indicate| IS_CLIENT_AND_PEER_STORED_CHECK{Is client and peer stored?};
    IS_CLIENT_AND_PEER_STORED_CHECK --> |Yes| SEND_APP_DATA_TO_PEER[Send Application Data to peer];
    IS_CLIENT_AND_PEER_STORED_CHECK --> |No| UNKNOWN_DATA[Unknown Data];
    STUN_MESSAGE_CHECK --> |Binding Request| SEND_BIDING_RESPONSE[Send Binding Success/Error Response];
    STUN_MESSAGE_CHECK --> |Allocate Request| IS_CORRECT_USER_CHECK{Is Correct User?};
    IS_CORRECT_USER_CHECK --> |Yes| STORE_CLIENT[Store client];
    STORE_CLIENT --> SEND_ALLOCATE_SUCCESS_RESPONSE[Send Allocate Success Response];
    IS_CORRECT_USER_CHECK --> |No| SEND_ALLOCATE_ERROR_RESPONSE[Send Allocate Error Respoinse];
    STUN_MESSAGE_CHECK --> |Create Permission Request| IS_CLIENT_STORED_CHECK1{Is client stored?};
    IS_CLIENT_STORED_CHECK1 --> |YES| STORE_PEER[Store peer];
    STORE_PEER --> SEND_CREATE_PERMISSION_SUCCESS_RESPONSE[Send Create Permission Success Response];
    IS_CLIENT_STORED_CHECK1 --> |No| SEND_CREATE_PERMISSION_ERROR_RESPONSE[Send Create Permission Error Response];
    STUN_MESSAGE_CHECK --> |Refresh Request| LIFETIME_ZERO_CHECK{Lifetime is 0?};
    LIFETIME_ZERO_CHECK --> |Yes| TERMINATE_CONNECTION[Terminate Connection];
    LIFETIME_ZERO_CHECK --> |No| SEND_REFRESH_RESPONSE[Send Refresh Success/Error Response];
    STUN_MESSAGE_CHECK --> |Channel Bind Request| IS_CLIENT_STORED_CHECK2{Is client stored?};
    IS_CLIENT_STORED_CHECK2 --> |Yes| STORE_CHANNEL_NUMBER_AND_PEER[Store Channel Number and Peer];
    STORE_CHANNEL_NUMBER_AND_PEER --> SEND_CHANEL_BIND_SUCCESS_RESPONSE[Send Channel Bind Success Response];
    IS_CLIENT_STORED_CHECK2 --> |No| SEND_CHANNEL_BIND_ERROR_RESPONSE[Send Channel Bind Error Response];

image

from doturn.

Related Issues (20)

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.