diff --git a/Assets/MsgTransmitTools/ExtendLinkModel/HttpServer.meta b/Assets/MsgTransmitTools/ExtendLinkModel/HttpServer.meta new file mode 100644 index 0000000..a40883e --- /dev/null +++ b/Assets/MsgTransmitTools/ExtendLinkModel/HttpServer.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9c88c85318bbb6545a737c48d87ce1fd +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MsgTransmitTools/ExtendLinkModel/TCPServer/Script/SocketServer.cs b/Assets/MsgTransmitTools/ExtendLinkModel/TCPServer/Script/SocketServer.cs index 75dbc95..a4072df 100644 --- a/Assets/MsgTransmitTools/ExtendLinkModel/TCPServer/Script/SocketServer.cs +++ b/Assets/MsgTransmitTools/ExtendLinkModel/TCPServer/Script/SocketServer.cs @@ -11,7 +11,7 @@ using UnityEngine; public class SocketServer : MonoBehaviour { - int _port = 20000; + int _port = 8443; string _ip = "192.168.1.41"; Thread thread; @@ -91,8 +91,8 @@ public class SocketServer : MonoBehaviour { break; } - string str = Encoding.UTF8.GetString(buffer, 0, len); - Debug.Log("服务器打印:" + socketSend.RemoteEndPoint + ":" + str); + string str = Encoding.ASCII.GetString(buffer, 0, len); + Debug.Log("数据接收:" + socketSend.RemoteEndPoint + ":" + str); Send("我收到了"); } } diff --git a/Assets/MsgTransmitTools/ExtendLinkModel/WebSocket.meta b/Assets/MsgTransmitTools/ExtendLinkModel/WebSocketServer.meta similarity index 100% rename from Assets/MsgTransmitTools/ExtendLinkModel/WebSocket.meta rename to Assets/MsgTransmitTools/ExtendLinkModel/WebSocketServer.meta diff --git a/Assets/MsgTransmitTools/ExtendLinkModel/WebSocket/Server.meta b/Assets/MsgTransmitTools/ExtendLinkModel/WebSocketServer/Server.meta similarity index 100% rename from Assets/MsgTransmitTools/ExtendLinkModel/WebSocket/Server.meta rename to Assets/MsgTransmitTools/ExtendLinkModel/WebSocketServer/Server.meta diff --git a/Assets/MsgTransmitTools/ExtendLinkModel/WebSocket/Server/MyWebSocketServer.cs b/Assets/MsgTransmitTools/ExtendLinkModel/WebSocketServer/Server/MyWebSocketServer.cs similarity index 100% rename from Assets/MsgTransmitTools/ExtendLinkModel/WebSocket/Server/MyWebSocketServer.cs rename to Assets/MsgTransmitTools/ExtendLinkModel/WebSocketServer/Server/MyWebSocketServer.cs diff --git a/Assets/MsgTransmitTools/ExtendLinkModel/WebSocket/Server/MyWebSocketServer.cs.meta b/Assets/MsgTransmitTools/ExtendLinkModel/WebSocketServer/Server/MyWebSocketServer.cs.meta similarity index 100% rename from Assets/MsgTransmitTools/ExtendLinkModel/WebSocket/Server/MyWebSocketServer.cs.meta rename to Assets/MsgTransmitTools/ExtendLinkModel/WebSocketServer/Server/MyWebSocketServer.cs.meta diff --git a/Assets/MsgTransmitTools/ExtendLinkModel/WebSocket/Server/Scenes.meta b/Assets/MsgTransmitTools/ExtendLinkModel/WebSocketServer/Server/Scenes.meta similarity index 100% rename from Assets/MsgTransmitTools/ExtendLinkModel/WebSocket/Server/Scenes.meta rename to Assets/MsgTransmitTools/ExtendLinkModel/WebSocketServer/Server/Scenes.meta diff --git a/Assets/MsgTransmitTools/ExtendLinkModel/WebSocket/Server/Scenes/SampleScene.unity b/Assets/MsgTransmitTools/ExtendLinkModel/WebSocketServer/Server/Scenes/SampleScene.unity similarity index 99% rename from Assets/MsgTransmitTools/ExtendLinkModel/WebSocket/Server/Scenes/SampleScene.unity rename to Assets/MsgTransmitTools/ExtendLinkModel/WebSocketServer/Server/Scenes/SampleScene.unity index f41ec8b..728da40 100644 --- a/Assets/MsgTransmitTools/ExtendLinkModel/WebSocket/Server/Scenes/SampleScene.unity +++ b/Assets/MsgTransmitTools/ExtendLinkModel/WebSocketServer/Server/Scenes/SampleScene.unity @@ -234,7 +234,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: address: 192.168.1.41 - port: 20000 + port: 8443 onOpen: m_PersistentCalls: m_Calls: diff --git a/Assets/MsgTransmitTools/ExtendLinkModel/WebSocket/Server/Scenes/SampleScene.unity.meta b/Assets/MsgTransmitTools/ExtendLinkModel/WebSocketServer/Server/Scenes/SampleScene.unity.meta similarity index 100% rename from Assets/MsgTransmitTools/ExtendLinkModel/WebSocket/Server/Scenes/SampleScene.unity.meta rename to Assets/MsgTransmitTools/ExtendLinkModel/WebSocketServer/Server/Scenes/SampleScene.unity.meta diff --git a/Assets/MsgTransmitTools/ExtendLinkModel/WebSocket/Server/WebSocketServer.meta b/Assets/MsgTransmitTools/ExtendLinkModel/WebSocketServer/Server/WebSocketServer.meta similarity index 100% rename from Assets/MsgTransmitTools/ExtendLinkModel/WebSocket/Server/WebSocketServer.meta rename to Assets/MsgTransmitTools/ExtendLinkModel/WebSocketServer/Server/WebSocketServer.meta diff --git a/Assets/MsgTransmitTools/ExtendLinkModel/WebSocket/Server/WebSocketServer/WebSocketConnection.cs b/Assets/MsgTransmitTools/ExtendLinkModel/WebSocketServer/Server/WebSocketServer/WebSocketConnection.cs similarity index 98% rename from Assets/MsgTransmitTools/ExtendLinkModel/WebSocket/Server/WebSocketServer/WebSocketConnection.cs rename to Assets/MsgTransmitTools/ExtendLinkModel/WebSocketServer/Server/WebSocketServer/WebSocketConnection.cs index 8f88596..f0ebb08 100644 --- a/Assets/MsgTransmitTools/ExtendLinkModel/WebSocket/Server/WebSocketServer/WebSocketConnection.cs +++ b/Assets/MsgTransmitTools/ExtendLinkModel/WebSocketServer/Server/WebSocketServer/WebSocketConnection.cs @@ -115,6 +115,7 @@ namespace WebSocketServer { } } else { Debug.Log("Framentation encoutered."); + Debug.Log("---------data:"+ Encoding.ASCII.GetString(dataframe.data)); } } } diff --git a/Assets/MsgTransmitTools/ExtendLinkModel/WebSocket/Server/WebSocketServer/WebSocketConnection.cs.meta b/Assets/MsgTransmitTools/ExtendLinkModel/WebSocketServer/Server/WebSocketServer/WebSocketConnection.cs.meta similarity index 100% rename from Assets/MsgTransmitTools/ExtendLinkModel/WebSocket/Server/WebSocketServer/WebSocketConnection.cs.meta rename to Assets/MsgTransmitTools/ExtendLinkModel/WebSocketServer/Server/WebSocketServer/WebSocketConnection.cs.meta diff --git a/Assets/MsgTransmitTools/ExtendLinkModel/WebSocket/Server/WebSocketServer/WebSocketProtocol.cs b/Assets/MsgTransmitTools/ExtendLinkModel/WebSocketServer/Server/WebSocketServer/WebSocketProtocol.cs similarity index 100% rename from Assets/MsgTransmitTools/ExtendLinkModel/WebSocket/Server/WebSocketServer/WebSocketProtocol.cs rename to Assets/MsgTransmitTools/ExtendLinkModel/WebSocketServer/Server/WebSocketServer/WebSocketProtocol.cs diff --git a/Assets/MsgTransmitTools/ExtendLinkModel/WebSocket/Server/WebSocketServer/WebSocketProtocol.cs.meta b/Assets/MsgTransmitTools/ExtendLinkModel/WebSocketServer/Server/WebSocketServer/WebSocketProtocol.cs.meta similarity index 100% rename from Assets/MsgTransmitTools/ExtendLinkModel/WebSocket/Server/WebSocketServer/WebSocketProtocol.cs.meta rename to Assets/MsgTransmitTools/ExtendLinkModel/WebSocketServer/Server/WebSocketServer/WebSocketProtocol.cs.meta diff --git a/Assets/MsgTransmitTools/ExtendLinkModel/WebSocket/Server/WebSocketServer/WebSocketServer.cs b/Assets/MsgTransmitTools/ExtendLinkModel/WebSocketServer/Server/WebSocketServer/WebSocketServer.cs similarity index 100% rename from Assets/MsgTransmitTools/ExtendLinkModel/WebSocket/Server/WebSocketServer/WebSocketServer.cs rename to Assets/MsgTransmitTools/ExtendLinkModel/WebSocketServer/Server/WebSocketServer/WebSocketServer.cs diff --git a/Assets/MsgTransmitTools/ExtendLinkModel/WebSocket/Server/WebSocketServer/WebSocketServer.cs.meta b/Assets/MsgTransmitTools/ExtendLinkModel/WebSocketServer/Server/WebSocketServer/WebSocketServer.cs.meta similarity index 100% rename from Assets/MsgTransmitTools/ExtendLinkModel/WebSocket/Server/WebSocketServer/WebSocketServer.cs.meta rename to Assets/MsgTransmitTools/ExtendLinkModel/WebSocketServer/Server/WebSocketServer/WebSocketServer.cs.meta