Skip to content

Simplify usage of Network library #161

@Exeloo

Description

@Exeloo

Which package or utils is this feature request for?

network-client ; network-server

Feature

Currently to read or write data with network libraries, we need to use

network.tcp.sendData(new TextEncoder().encode(JSON.stringify(data)));

This method isn't really accessible

Ideal solution or implementation

A solution can be the creation of an other lib network-utils that will be used by client and server.
This lib will provide class NetworkData that will act like NfFile in asset manager lib :
This data will be return by receive data and will allow user to choose in witch format he wants to get his data.

Also, the client and server library must implement a way to send all data types that will be provide by this NetworkData.

No need to specify the format of the data in the packet as the user will be aware of the data type that he sent.

Alternative solutions or implementations

No response

Other context

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions