-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
66 changed files
with
103 additions
and
9 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
using HiSocket.Tcp; | ||
/*************************************************************** | ||
* Description: | ||
* | ||
* Documents: https://github.com/hiramtan/HiSocket | ||
* Author: [email protected] | ||
***************************************************************/ | ||
using HiSocket.Tcp; | ||
|
||
namespace HiSocket.Example | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
using System; | ||
/*************************************************************** | ||
* Description: | ||
* | ||
* Documents: https://github.com/hiramtan/HiSocket | ||
* Author: [email protected] | ||
***************************************************************/ | ||
using System; | ||
using HiSocket.Tcp; | ||
|
||
namespace HiSocket.Example | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
using HiSocket.Tcp; | ||
/*************************************************************** | ||
* Description: | ||
* | ||
* Documents: https://github.com/hiramtan/HiSocket | ||
* Author: [email protected] | ||
***************************************************************/ | ||
using HiSocket.Tcp; | ||
|
||
namespace HiSocket.Example | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
using HiFramework; | ||
/*************************************************************** | ||
* Description: | ||
* | ||
* Documents: https://github.com/hiramtan/HiSocket | ||
* Author: [email protected] | ||
***************************************************************/ | ||
using HiFramework; | ||
using HiSocket.Tcp; | ||
using System; | ||
|
||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
src/HiSocket.Example/obj/Debug/HiSocket.Example.csprojAssemblyReference.cache
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
/*************************************************************** | ||
* Description: | ||
* | ||
* Documents: https://github.com/hiramtan/HiSocket | ||
* Author: [email protected] | ||
***************************************************************/ | ||
using HiFramework.Core; | ||
using HiFramework.Unity; | ||
using HiSocket.Example; | ||
using HiSocket.Tcp; | ||
using UnityEngine; | ||
|
||
namespace HiSocket.Example_Unity | ||
{ | ||
|
@@ -11,4 +18,41 @@ static void Main(string[] args) | |
{ | ||
} | ||
} | ||
public class Example : MonoBehaviour | ||
{ | ||
private ITickComponent tick; | ||
private IMainThread mainThread; | ||
// Use this for initialization | ||
void Start() | ||
{ | ||
Center.Init(); | ||
tick = Center.Get<ITickComponent>(); | ||
Connect(); | ||
} | ||
|
||
// Update is called once per frame | ||
void Update() | ||
{ | ||
tick.Tick(Time.deltaTime); | ||
} | ||
|
||
TcpConnection tcp; | ||
void Connect() | ||
{ | ||
var package = new PackageExample(); | ||
tcp = new TcpConnection(package); | ||
tcp.OnReceiveMessage += OnReceive; | ||
tcp.Connect("127.0.0.1", 999); | ||
} | ||
|
||
void OnReceive(byte[] message) | ||
{ | ||
mainThread.RunOnMainThread(OnMainThread,message); | ||
} | ||
|
||
void OnMainThread(object message) | ||
{ | ||
var data = message as byte[]; | ||
} | ||
} | ||
} |
Binary file modified
BIN
-512 Bytes
(91%)
src/HiSocket.Example_Unity/bin/Debug/HiFramework.Assert.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+1 KB
(120%)
src/HiSocket.Example_Unity/bin/Debug/HiSocket.Example_Unity.exe
Binary file not shown.
Binary file modified
BIN
+2 KB
(110%)
src/HiSocket.Example_Unity/bin/Debug/HiSocket.Example_Unity.pdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+518 Bytes
(110%)
src/HiSocket.Example_Unity/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
Binary file not shown.
2 changes: 1 addition & 1 deletion
2
src/HiSocket.Example_Unity/obj/Debug/HiSocket.Example_Unity.csproj.CoreCompileInputs.cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
96e74d90602e97ade72df0fd66b682badf9fbe33 | ||
4f0e9bdfc0bbc9c69411d59fe82c6b598fb59975 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+10.8 KB
(140%)
src/HiSocket.Example_Unity/obj/Debug/HiSocket.Example_Unity.csprojAssemblyReference.cache
Binary file not shown.
Binary file modified
BIN
+1 KB
(120%)
src/HiSocket.Example_Unity/obj/Debug/HiSocket.Example_Unity.exe
Binary file not shown.
Binary file modified
BIN
+2 KB
(110%)
src/HiSocket.Example_Unity/obj/Debug/HiSocket.Example_Unity.pdb
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="HiFramework" version="1.0.7" targetFramework="net35" /> | ||
<package id="HiFramework.Assert" version="1.0.2" targetFramework="net35" /> | ||
<package id="HiFramework.Core" version="1.0.0" targetFramework="net35" /> | ||
</packages> |
Binary file modified
BIN
-78 Bytes
(100%)
src/HiSocket.Message/obj/Debug/HiSocket.Message.csprojAssemblyReference.cache
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+12.5 KB
src/HiSocket.Tcp/obj/Debug/HiSocket.Tcp.csprojAssemblyReference.cache
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
src/HiSocket.Test/obj/Debug/HiSocket.Test.csprojAssemblyReference.cache
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.