• Stars
    star
    890
  • Rank 51,276 (Top 2 %)
  • Language
    C#
  • Created almost 12 years ago
  • Updated over 10 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

socket.io client for unity3d.

UnitySocketIO

The project is the socket.io client for unity3d, written in C#. It's based on socketio4net.Client (http://socketio4net.codeplex.com/). However, socketio4net.Client only provides a .NET 4.0 C# client, and does compatible with unity3d. We've done a lot of works on supporting unity3d.

The project was initially designed for unity client of pomelo framework, which is a powerful, scalable game server framework.

How to use

It is very simple to use UnitySocketIO. Copy all the DLLS locating in the file of /bin/Debug/ to your project.

Of course, you can download this project and compile it:

git clone https://github.com/NetEase/UnitySocketIO.git

API

Create and initialize a new UnitySocketIO client.

Client client = new Client(url);

client.Opened += SocketOpened;
client.Message += SocketMessage;
client.SocketConnectionClosed += SocketConnectionClosed;
client.Error +=SocketError;

client.Connect();

private void SocketOpened(object sender, MessageEventArgs e) {
    //invoke when socket opened
}

Send message to server.

client.Send(messge);

Get message from server.

private void SocketMessage (object sender, MessageEventArgs e) {
    if ( e!= null && e.Message.Event == "message") {
        string msg = e.Message.MessageText;
       process(msg);
    }
}

Close connection.

client.Close();

##License (The MIT License)

Copyright (c) 2012-2013 NetEase, Inc. and other contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

pomelo

A fast,scalable,distributed game server framework for Node.js.
JavaScript
11,871
star
2

tango

A code driven low-code builder, develop low-code app on your codebase.
TypeScript
2,047
star
3

lordofpomelo

the online demo of pomelo
JavaScript
797
star
4

amoro

Amoro is a Lakehouse management system built on open data lake formats.
Java
640
star
5

chatofpomelo

chat application of pomelo
JavaScript
299
star
6

pomelo-unityclient-socket

pomele dotnet client
C#
170
star
7

libpomelo2

A New Client SDK for Pomelo
C
133
star
8

libpomelo

[DEPRECATED] Please Go to https://github.com/NetEase/libpomelo2
C
116
star
9

pomelo-unityclient

pomelo client for unity3d.
C#
113
star
10

chatofpomelo-websocket

chatofpomelo with pomelo 0.3.0
JavaScript
101
star
11

pomelo-cocos2d-js

pomelo-cocos2d-js client
JavaScript
101
star
12

arrow

A TestNG plugin with better test report template, re-run tests on failure, and many more.
Java
97
star
13

pomelo-rpc

rpc framework for pomelo
JavaScript
96
star
14

airtest

Deprecated, moved to http://airtest.netease.com
Python
93
star
15

treasures

a tutorial demo of pomelo
JavaScript
90
star
16

pomelo-androidclient

java&android client for pomelo
Java
83
star
17

pomelo-iosclient

iOS client lib for pomelo
Objective-C
68
star
18

pomelo-aoi

The aoi module used in lordofpomelo
JavaScript
59
star
19

pomelo-cocos2dchat

cocos2dchat based on cocos2d-x and libpomelo
C++
57
star
20

pomelo-admin

admin module for pomelo monitor system
JavaScript
51
star
21

pomelo-scheduler

the high performance schedule module for calling scheduled task
JavaScript
50
star
22

pomelo-ioschat

A chat demo for pomelo iOS client
Objective-C
49
star
23

hive-tools

Java
46
star
24

erlyssh

A Parallel SSH Execution Tool
Erlang
44
star
25

pomelo-sync

the backend database sync module
JavaScript
42
star
26

pomelo-robot

the client test framework for websocket
JavaScript
41
star
27

Polyphonic-TrOMR

TrOMR:Transformer-based Polyphonic Optical Music Recognition
Python
41
star
28

pomelo-unitychat-socket

pomelo-chat client based on socket, support unity 3D and other .net environment,
ASP
39
star
29

pomelo-cn

The Chinese issues for pomelo.
38
star
30

pomelo-admin-web

monitor server demo for pomelo admin system
JavaScript
36
star
31

pomelo-bt

behavior tree implementation for pomelo ai
JavaScript
34
star
32

pomelo-cli

pomelo-cli is a command-line library for pomelo maintenance
JavaScript
32
star
33

pomelo-androidchat

chat client application using android client for pomelo
Java
31
star
34

pomelo-robot-demo

pomelo-protocol
JavaScript
31
star
35

pomelo-mqtt-connector

pomelo mqtt connector based on mqtt over tcp and over ws protocol
JavaScript
30
star
36

pomelo-globalchannel-plugin

globalChannel plugin for pomelo
JavaScript
30
star
37

pomelo-protocol

pomelo-protocol
JavaScript
30
star
38

pomelo-logger

logger wrapper of log4js for pomelo logger system
JavaScript
26
star
39

pomelo-status-plugin

status plugin for pomelo
JavaScript
24
star
40

mebius

精准桋试sdk
Java
23
star
41

c

Python
20
star
42

pomelo-zookeeper-plugin

zookeeper service for pomelo
JavaScript
19
star
43

nec

Netease's nec css framework,
CSS
18
star
44

pomelo-unitychat

ASP
17
star
45

opencurve

14
star
46

pomelo-sync-plugin

sync plugin for pomelo
JavaScript
14
star
47

pomelo-rpc-zeromq

pomelo rpc using zeromq for communication
JavaScript
13
star
48

tango-boot

A frontend framework for netease tango low-code app
TypeScript
12
star
49

pomelo-protobuf-plugin

plugin for pomelo protobuf
JavaScript
12
star
50

lakehouse-benchmark

A benchmark tool for lakehouses.
Java
11
star
51

pomelo-pathfinding

Path finding module used in lordofpomelo.
JavaScript
10
star
52

tango-components

An UI library for tango low-code builder
TypeScript
10
star
53

pomelo-dotnetchat-console

pomelo-chat client based on socket and .net
C#
10
star
54

pomelo-loader

loader module for pomelo to load handler and remote with the convention over configuration rules
JavaScript
10
star
55

example

C
9
star
56

pomelo-daemon

provide daemon process service for pomelo to deploy in distributed environments
JavaScript
9
star
57

ranger

Java
9
star
58

pomelo-scale-plugin

scale up service for pomelo
JavaScript
7
star
59

pomelo-masterha-plugin

master ha plugin for pomelo
JavaScript
7
star
60

pomelo-data-plugin

load data pomelo plugin
JavaScript
6
star
61

kyuubi-arctic-playground

Playbook of Kyuubi and Arctic Demo
Dockerfile
6
star
62

tango-playground

A playground app of tango low-code builder
TypeScript
5
star
63

pomelo-monitor

Simple, comprehensive monitoring tool for operating-system and process in nodejs.
JavaScript
5
star
64

lakehouse-benchmark-ingestion

A ingestion tool for Lakehouse benchmark
Java
4
star
65

pomelo-collection

Collection used for pomelo
JavaScript
4
star
66

airtest-gui

GUI write by qt for airtest
Python
3
star
67

pomelo-data-plugin-demo

pomelo-data-plugin demo
JavaScript
3
star
68

tango-site

Official site of NetEase Tango low-code builder
TypeScript
3
star
69

amoro-site

Documentation site for project Amoro
SCSS
2
star
70

amoro-medium

Medium materials for project Amoro
1
star