GithubHelp home page GithubHelp logo

perpetual24 / pingplugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from descendentstudios/pingplugin

0.0 0.0 0.0 1.58 MB

Plugin for Unreal Engine 4 (UE4) to ICMP ping hosts and obtain results from Blueprint

License: Apache License 2.0

C++ 94.08% C 1.18% C# 4.74%

pingplugin's Introduction

Ping

An Unreal Engine 4 project plugin by Descendent Studios

Overview

While it has robust support for computing ping to the server to which a game client is currently connected, Unreal Engine 4 does not have a natively-supported way to ping an arbitrary host, which is vital for features like server browsers.

Ping is a plugin to do just that. Not only does it give this functionality to any UE4 project, it also exposes all that functionality to Blueprint, making it easy for any developer to add arbitrary host-pinging to a project. Also, Ping is compatible with Windows, Mac, and Linux builds of UE4 projects.

Ping is multi-threaded, which means your game will not block while the client is waiting for the echo.

Ping was created for Descent: Underground, and will be updated as necessary for DU. For questions relating to Ping's development, please contact Tyler Pixley (Github user Pixley).

Usage

Ping will need to be built before it can be used. Your UE4 editor should detect that it needs to do the build. Otherwise, you'll need to recompile your game project.

Example Blueprint

Pinging a host is easy. Create a PingIP object, then bind events to OnPingComplete and OnPingFailure. Then Call SendPing() on your host, either by hostname or IPv4 address (IPv6 is not currently supported, since UE4 does server join over IPv4).

That's it! When the ping thread has completed, the event bound to OnPingComplete or OnPingFailure will be called, depending on whether an echo was received.

It is important to note that to run simultaneous pings, different PingIP objects will need to created. For example, in Descent: Underground, each match listing in the match browser has its own PingIP object.

Q&A

Why is the name just "Ping"?

Pixley isn't very creative when it comes to naming things. It's the ping plugin. Thus the name of the plugin ended up as "Ping".

Why do the Mac and Linux versions use "ping" from the shell?

Making an ICMP_ECHO request from a user process is made effectively impossible on many Linux distros. It can be done, but it requires user modification, and that is not desirable when the user is just trying to play a video game. Mac uses the same code as Linux, since they're both more-or-less POSIX-compliant. Means we had to write one less pathway.

pingplugin's People

Contributors

descendentstudios avatar philippe23 avatar stormwind99 avatar tolc 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.