Coder Social home page Coder Social logo

redarchy / simpleunitytcp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ericbatlle/simpleunitytcp

0.0 0.0 0.0 262 KB

๐Ÿ–ง Simple Unity Project to show how TCP communication are builded in C# without multi-threading or Unity network (Unet) involved.

License: MIT License

C# 100.00%

simpleunitytcp's Introduction

SimpleUnityTCP ๐Ÿ–ง

A simple demo-project to show how TCP communication works on Unity environment, builded with C# and using System.Net.Sockets.

The main porpouse of this repo is to show the TCP communication on runtime, but also to provide a pretty commented and clear code so everyone else that wants to implement that kind of communication will be able without wasting a lot of time.

Video-Example ๐Ÿ“ฒ

example_app gif

Donations are appreciated! ๐Ÿ’ธ

Remember that are many ways to say thank you.

If this repository has been helpful remember to star it and consider buying me a coffee! ๐Ÿ˜€

Buy Me A Coffee

If you like my general work and contributions consider sponsoring me on Github.

But if you just want to donate straightforward, I also have PayPal.me.

How to Use ๐Ÿ’ป

If you only want to see the app working, just run the SimpleTCP.exe which is located on the build directory.

If you want to open the project, you will need to have Unity installed with the version 2017 or higher.

If you only want to scratch the code, either inside the unity project or simply dragging the .cs classes on your editor, you have to watch on to this classes, which are located on Assets:

  • Server.cs
  • Client.cs

More Explanations ๐Ÿ“ก

Note: Unity do not allow the save-use of Multi-Threading, so the application is using Co-routines instead.

The stablished communication and workflow stablished right now follows the next order:

  • Start the Server and let him waiting for client connections.
  • Start the Client and connect him to the server.
  • Server waits for client messages...
  • Client send the message Close to the server.
  • Server recives that Close message.
  • Server send a response to the client, sending the same message, Close.
  • Client recives the message, close the connection with the server and shuts down.
  • Server close the connection with the client.
  • Server shuts down

simpleunitytcp's People

Contributors

ericbatlle 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.