All Projects → psygames → UnityWebSocket

psygames / UnityWebSocket

Licence: MIT License
🐳 The Best Unity WebSocket Plugin for All Platforms.

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to UnityWebSocket

Socketify
Raw TCP and UDP Sockets API on Desktop Browsers
Stars: ✭ 67 (-79.13%)
Mutual labels:  socket
dystopia
Low to medium multithreaded Ubuntu Core honeypot coded in Python.
Stars: ✭ 59 (-81.62%)
Mutual labels:  socket
Stone
A Swift framework for connecting to Phoenix Channels in your iOS app (with Presence support).
Stars: ✭ 18 (-94.39%)
Mutual labels:  socket
TweetMigration
A WebGL heatmap of global Twitter activity
Stars: ✭ 42 (-86.92%)
Mutual labels:  socket
asynchronous
A D port of Python's asyncio library
Stars: ✭ 35 (-89.1%)
Mutual labels:  socket
Picamera
基于树莓派的图传监控系统
Stars: ✭ 22 (-93.15%)
Mutual labels:  socket
video-chat
Simple Web Application that offer you to create video meeting room using WebRTC and Socket.
Stars: ✭ 32 (-90.03%)
Mutual labels:  socket
30dayMakeCppServer
30天自制C++服务器,包含教程和源代码
Stars: ✭ 432 (+34.58%)
Mutual labels:  socket
ws2s
ws2s(websocket to socket)--bring socket to browser-side js.
Stars: ✭ 50 (-84.42%)
Mutual labels:  socket
game net
Unity游戏和C++服务器 socket通信demo, 数据格式采用google protobuf
Stars: ✭ 53 (-83.49%)
Mutual labels:  socket
DatagramTunneler
Simple C++ cross-platform client/server app forwarding UDP datagrams through a TCP connection.
Stars: ✭ 116 (-63.86%)
Mutual labels:  socket
react-webrtc-chat
React WebRTC chat
Stars: ✭ 39 (-87.85%)
Mutual labels:  socket
chattt-backend
🖥 Backend for chattt
Stars: ✭ 17 (-94.7%)
Mutual labels:  socket
LittleDrawBoard AN
基于socket实现的pc端和android端同步绘画板_ANDROID源码
Stars: ✭ 30 (-90.65%)
Mutual labels:  socket
EasyFileTransfer
An easy way to transfer file with any size on network with tcp protocol.
Stars: ✭ 30 (-90.65%)
Mutual labels:  socket
freebind
IPv4 and IPv6 address rate limiting evasion tool
Stars: ✭ 88 (-72.59%)
Mutual labels:  socket
quick-net
This is a top level socket library, making servers and clients EASY!
Stars: ✭ 15 (-95.33%)
Mutual labels:  socket
Vutils
Vutils or Vic Utilities is an utility library written in Modern C++ and for Modern C++. It helps your programming go easier, faster, and simpler.
Stars: ✭ 16 (-95.02%)
Mutual labels:  socket
Tiginx
Tiginx is a Shanzhai Nginx project , please buyao use it xian , if meet problem , I no fuze ...
Stars: ✭ 29 (-90.97%)
Mutual labels:  socket
video-group-meeting
WebRTC video chat for multi users using React and Node Express.
Stars: ✭ 40 (-87.54%)
Mutual labels:  socket

(English)

在线示例

快速开始

安装方法

  • Releases 页面中,下载最新版本的 UnityWebSocket.unitypackage 安装包,然后导入到您的项目中。

使用方法

  • 代码示例

    // 命名空间
    using UnityWebSocket;
    
    // 创建实例
    string address = "ws://echo.websocket.org";
    WebSocket socket = new WebSocket(address);
    
    // 注册回调
    socket.OnOpen += OnOpen;
    socket.OnClose += OnClose;
    socket.OnMessage += OnMessage;
    socket.OnError += OnError;
    
    // 连接
    socket.ConnectAsync();
    
    // 发送 string 类型数据
    socket.SendAsync(str); 
    
    // 或者 发送 byte[] 类型数据(建议使用)
    socket.SendAsync(bytes); 
    
    // 关闭连接
    socket.CloseAsync();
  • 更多使用方法可参考项目中的 UnityWebSocketDemo.cs 示例代码。

  • 功能菜单:

    • Tools -> UnityWebSocket,版本更新检测,问题反馈渠道等。
  • Unity 编译宏(可选项):

    • UNITY_WEB_SOCKET_LOG 打开底层日志输出。
    • UNITY_WEB_SOCKET_ENABLE_ASYNC 针对非WebGL平台使用异步线程处理消息(需自行处理跨线程访问Unity组件问题)。

QQ 交流群

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].