Coder Social home page Coder Social logo

risooonho / objectdeliverer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ayumax/objectdeliverer

0.0 1.0 0.0 8.73 MB

ObjectDeliverer is a data transmission / reception library for Unreal Engine (C ++, Blueprint).

Home Page: https://www.unrealengine.com/marketplace/ja/slug/objectdeliverer

License: MIT License

C# 1.38% C++ 98.43% C 0.05% Batchfile 0.13%

objectdeliverer's Introduction

ObjectDeliverer

UE4 Marketplace

https://www.unrealengine.com/marketplace/ja/slug/objectdeliverer

Description

ObjectDeliverer is a data transmission / reception library for Unreal Engine (C ++, Blueprint).

It has the following features.

  • Communication protocol, data division rule, serialization method can be switched by part replacement.
  • Available for both C ++ and Blueprint

Relationship between branch and UE4 Engine version

The master branch only supports UE4 4.25. You cannot build with 4.24 or lower. Use the'lessthan_425 'branch if you use it below 4.24.

Engine Version branch
4.25 master
4.24 or less lessthan_425

Communication protocol

The following protocols can be used with built-in. You can also add your own protocol.

  • TCP/IP Server(Connectable to multiple clients)
  • TCP/IP Client
  • UDP(Sender)
  • UDP(Receiver)
  • Shared Memory(Windows Only)
  • LogFile Writer
  • LogFile Reader

Data division rule

The following rules are available for built-in split rules of transmitted and received data.

  • FixedSize
    Example) In the case of fixed 1024 bytes fixedlength

  • Header(BodySize) + Body
    Example) When the size area is 4 bytes
    sizeandbody

  • Split by terminal symbol
    Example) When 0x00 is the end terminate

Serialization method

  • Byte Array
  • UTF-8 string
  • Object(Json)

Installation

  • Please clone this repository
  • Please copy the Plugins directory to the project folder
  • Please activate ObjectDeliverer from Plugins after launching editor

Quick Start

  1. Create an ObjectDelivererManager
  2. Create a DeliveryBox(If you wish to send and receive data other than binary)
  3. Set the send / receive protocol and PacketRule, then start the ObjectDelivererManager

gallery 1

void UMyClass::Start()
{
    auto deliverer = UObjectDelivererManager::CreateObjectDelivererManager();

    // bind connected event
    deliverer->Connected.AddDynamic(this, &UMyClass::OnConnect);
    // bind disconnected event
    deliverer->Disconnected.AddDynamic(this, &UMyClass::OnDisConnect);
    // bind receive event
    deliverer->ReceiveData.AddDynamic(this, &UMyClass::OnReceive);

    // start deliverer
    // + protocol : TCP/IP Server
    // + Data division rule : Header(BodySize) + Body
    // + Serialization method : Byte Array
    deliverer->Start(UProtocolFactory::CreateProtocolTcpIpServer(9099),
                     UPacketRuleFactory::CreatePacketRuleSizeBody());
}

void UMyClass::OnConnect(UObjectDelivererProtocol* ClientSocket)
{
    // send data
    TArray<uint8> buffer;
    deliverer->Send(buffer);
}

void UMyClass::OnDisConnect(UObjectDelivererProtocol* ClientSocket)
{
    // closed
    UE_LOG(LogTemp, Log, TEXT("closed"));
}

void UMyClass::OnReceive(UObjectDelivererProtocol* ClientSocket, const TArray<uint8>& Buffer)
{
    // received data buffer
}

How to use each function

Look at the Wiki https://github.com/ayumax/ObjectDeliverer/wiki

objectdeliverer's People

Contributors

ayumax avatar

Watchers

James Cloos 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.