hmmmmmm
parent
2d16a14700
commit
44b3b363bb
|
|
@ -10,9 +10,10 @@ namespace VelNet
|
|||
{
|
||||
public class NetworkGUI : MonoBehaviour
|
||||
{
|
||||
[FormerlySerializedAs("networkManager")]
|
||||
public VelNetManager velNetManager;
|
||||
|
||||
public bool autoConnect = true;
|
||||
|
||||
public InputField userInput;
|
||||
public InputField sendInput;
|
||||
public InputField roomInput;
|
||||
|
|
@ -21,11 +22,12 @@ namespace VelNet
|
|||
public Dropdown microphones;
|
||||
private DissonanceComms comms;
|
||||
|
||||
|
||||
public void HandleLogin()
|
||||
{
|
||||
if (userInput.text != "")
|
||||
{
|
||||
VelNetManager.Login(userInput.text, "nopass");
|
||||
VelNetManager.Login(userInput.text, SystemInfo.deviceUniqueIdentifier);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -64,8 +66,11 @@ namespace VelNet
|
|||
comms = FindObjectOfType<DissonanceComms>();
|
||||
microphones.AddOptions(new List<string>(Microphone.devices));
|
||||
|
||||
if (autoConnect)
|
||||
{
|
||||
StartCoroutine(testes());
|
||||
}
|
||||
}
|
||||
|
||||
IEnumerator testes()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using VelNet;
|
||||
|
||||
|
|
|
|||
|
|
@ -305,7 +305,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 227.83, y: 138}
|
||||
m_AnchoredPosition: {x: 225.6, y: 148.2}
|
||||
m_SizeDelta: {x: 445.67, y: 38.7538}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &117638566
|
||||
|
|
@ -606,6 +606,8 @@ RectTransform:
|
|||
- {fileID: 948755938}
|
||||
- {fileID: 545137760}
|
||||
- {fileID: 1997780490}
|
||||
- {fileID: 1020014860}
|
||||
- {fileID: 1536292193}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
|
@ -627,6 +629,7 @@ MonoBehaviour:
|
|||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
velNetManager: {fileID: 1099803616}
|
||||
autoConnect: 0
|
||||
userInput: {fileID: 626742069}
|
||||
sendInput: {fileID: 0}
|
||||
roomInput: {fileID: 711524768}
|
||||
|
|
@ -893,7 +896,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 5, y: 76.8}
|
||||
m_AnchoredPosition: {x: 2, y: 87}
|
||||
m_SizeDelta: {x: 160, y: 30}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!114 &545137761
|
||||
|
|
@ -1144,7 +1147,7 @@ MonoBehaviour:
|
|||
m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
||||
m_CustomCaretColor: 0
|
||||
m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412}
|
||||
m_Text: TEST USER
|
||||
m_Text: ExampleApp
|
||||
m_CaretBlinkRate: 0.85
|
||||
m_CaretWidth: 1
|
||||
m_ReadOnly: 0
|
||||
|
|
@ -1157,7 +1160,7 @@ RectTransform:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 626742068}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: -0}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 2034439}
|
||||
|
|
@ -1167,7 +1170,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 213.2, y: 51}
|
||||
m_AnchoredPosition: {x: 213.20001, y: 58.600006}
|
||||
m_SizeDelta: {x: 160, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &626742071
|
||||
|
|
@ -1338,7 +1341,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 211.20001, y: 15.5}
|
||||
m_AnchoredPosition: {x: 213.1, y: 15.5}
|
||||
m_SizeDelta: {x: 160, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &711524768
|
||||
|
|
@ -1559,7 +1562,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 356.07678, y: 15.5}
|
||||
m_AnchoredPosition: {x: 357.97678, y: 15.5}
|
||||
m_SizeDelta: {x: 125.7535, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &864104177
|
||||
|
|
@ -2133,6 +2136,85 @@ CanvasRenderer:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 948755937}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1020014859
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1020014860}
|
||||
- component: {fileID: 1020014862}
|
||||
- component: {fileID: 1020014861}
|
||||
m_Layer: 5
|
||||
m_Name: Text
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1020014860
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1020014859}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 244561620}
|
||||
m_RootOrder: 10
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 139.40002, y: 71.6}
|
||||
m_SizeDelta: {x: 130.6655, y: 11.7458}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!114 &1020014861
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1020014859}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 10
|
||||
m_FontStyle: 1
|
||||
m_BestFit: 0
|
||||
m_MinSize: 1
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 0
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: App Name
|
||||
--- !u!222 &1020014862
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1020014859}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1047954371
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -2564,7 +2646,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 65.39307, y: 15.5}
|
||||
m_AnchoredPosition: {x: 67.29309, y: 15.5}
|
||||
m_SizeDelta: {x: 130.7862, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1278634768
|
||||
|
|
@ -3099,6 +3181,85 @@ CanvasRenderer:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1484033255}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1536292192
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1536292193}
|
||||
- component: {fileID: 1536292195}
|
||||
- component: {fileID: 1536292194}
|
||||
m_Layer: 5
|
||||
m_Name: Text (1)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1536292193
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1536292192}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 244561620}
|
||||
m_RootOrder: 11
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 139.40002, y: 28.5}
|
||||
m_SizeDelta: {x: 130.6655, y: 11.7458}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!114 &1536292194
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1536292192}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 10
|
||||
m_FontStyle: 1
|
||||
m_BestFit: 0
|
||||
m_MinSize: 1
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 0
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: Room Name
|
||||
--- !u!222 &1536292195
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1536292192}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1557879930
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -3252,7 +3413,7 @@ MonoBehaviour:
|
|||
m_HorizontalOverflow: 1
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: TEST USER
|
||||
m_Text: ExampleApp
|
||||
--- !u!1 &1679565283
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -3325,7 +3486,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 67.02789, y: 51}
|
||||
m_AnchoredPosition: {x: 67.02789, y: 58.600006}
|
||||
m_SizeDelta: {x: 130.7862, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1760805526
|
||||
|
|
@ -3749,7 +3910,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 172, y: 76.8}
|
||||
m_AnchoredPosition: {x: 169, y: 87}
|
||||
m_SizeDelta: {x: 160, y: 30}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!114 &1997780491
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Sockets;
|
||||
|
|
@ -27,6 +26,7 @@ namespace VelNet
|
|||
YOU_LEFT = 7,
|
||||
ROOM_DATA = 8
|
||||
}
|
||||
|
||||
public enum MessageSendType
|
||||
{
|
||||
MESSAGE_OTHERS_ORDERED = 7,
|
||||
|
|
@ -168,7 +168,7 @@ namespace VelNet
|
|||
public class RoomDataMessage : Message
|
||||
{
|
||||
public string room;
|
||||
public List<Tuple<int, string>> members = new List<Tuple<int, string>>();
|
||||
public readonly List<Tuple<int, string>> members = new List<Tuple<int, string>>();
|
||||
}
|
||||
|
||||
public class JoinMessage : Message
|
||||
|
|
@ -199,6 +199,7 @@ namespace VelNet
|
|||
public int userId;
|
||||
public string room;
|
||||
}
|
||||
|
||||
public class YouLeftMessage : Message
|
||||
{
|
||||
public string room;
|
||||
|
|
@ -296,8 +297,6 @@ namespace VelNet
|
|||
}
|
||||
case RoomsMessage rm:
|
||||
{
|
||||
Debug.Log("Got Rooms Message:\n" + rm);
|
||||
|
||||
try
|
||||
{
|
||||
RoomsReceived?.Invoke(rm);
|
||||
|
|
@ -312,7 +311,6 @@ namespace VelNet
|
|||
}
|
||||
case RoomDataMessage rdm:
|
||||
{
|
||||
Debug.Log("Got room data message:" + rdm.room);
|
||||
try
|
||||
{
|
||||
RoomDataReceived?.Invoke(rdm);
|
||||
|
|
@ -322,6 +320,7 @@ namespace VelNet
|
|||
{
|
||||
Debug.LogError(e);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case YouJoinedMessage jm:
|
||||
|
|
@ -333,15 +332,13 @@ namespace VelNet
|
|||
|
||||
foreach (int playerId in jm.ids)
|
||||
{
|
||||
|
||||
VelNetPlayer player = new VelNetPlayer
|
||||
{
|
||||
isLocal = playerId == userid,
|
||||
room = jm.room,
|
||||
userid = playerId
|
||||
userid = playerId,
|
||||
isLocal = playerId == userid,
|
||||
};
|
||||
players.Add(player.userid, player);
|
||||
|
||||
}
|
||||
|
||||
try
|
||||
|
|
@ -356,6 +353,8 @@ namespace VelNet
|
|||
}
|
||||
|
||||
foreach (KeyValuePair<int, VelNetPlayer> kvp in players)
|
||||
{
|
||||
if (kvp.Key != userid)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
@ -367,12 +366,12 @@ namespace VelNet
|
|||
Debug.LogError(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
case YouLeftMessage lm:
|
||||
case YouLeftMessage msg:
|
||||
{
|
||||
string oldRoom = LocalPlayer?.room;
|
||||
// delete all networkobjects that aren't sceneobjects or are null now
|
||||
|
|
@ -401,6 +400,7 @@ namespace VelNet
|
|||
{
|
||||
Debug.LogError(e);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case PlayerLeftMessage lm:
|
||||
|
|
@ -446,11 +446,11 @@ namespace VelNet
|
|||
{
|
||||
Debug.LogError(e);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case JoinMessage jm:
|
||||
{
|
||||
|
||||
// we got a join message, create it
|
||||
VelNetPlayer player = new VelNetPlayer
|
||||
{
|
||||
|
|
@ -470,7 +470,6 @@ namespace VelNet
|
|||
}
|
||||
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
case DataMessage dm:
|
||||
|
|
@ -500,6 +499,7 @@ namespace VelNet
|
|||
{
|
||||
Debug.LogError("Scene Network ID is 0. Make sure to assign one first.", sceneObjects[i]);
|
||||
}
|
||||
|
||||
sceneObjects[i].networkId = -1 + "-" + sceneObjects[i].sceneNetworkId;
|
||||
sceneObjects[i].owner = masterPlayer;
|
||||
sceneObjects[i].isSceneObject = true; // needed for special handling when deleted
|
||||
|
|
@ -599,7 +599,6 @@ namespace VelNet
|
|||
AddMessage(new ConnectedMessage());
|
||||
while (true)
|
||||
{
|
||||
|
||||
//read a byte
|
||||
MessageReceivedType type = (MessageReceivedType)stream.ReadByte();
|
||||
|
||||
|
|
@ -658,6 +657,7 @@ namespace VelNet
|
|||
rdm.members.Add(new Tuple<int, string>(client_id, username));
|
||||
Debug.Log(username);
|
||||
}
|
||||
|
||||
AddMessage(rdm);
|
||||
break;
|
||||
}
|
||||
|
|
@ -700,6 +700,7 @@ namespace VelNet
|
|||
{
|
||||
m.ids.Add(GetIntFromBytes(ReadExact(stream, 4)));
|
||||
}
|
||||
|
||||
N = stream.ReadByte();
|
||||
byte[] utf8data = ReadExact(stream, N); //the room name, encoded as utf-8
|
||||
m.room = Encoding.UTF8.GetString(utf8data);
|
||||
|
|
@ -725,7 +726,6 @@ namespace VelNet
|
|||
AddMessage(m);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -845,20 +845,22 @@ namespace VelNet
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Connects to the server with a username
|
||||
/// Connects to the server for a particular app
|
||||
/// </summary>
|
||||
public static void Login(string username, string password)
|
||||
/// <param name="appName">A unique name for your app. Communication can only happen between clients with the same app name.</param>
|
||||
/// <param name="deviceId">Should be unique per device that connects. e.g. md5(deviceUniqueIdentifier)</param>
|
||||
public static void Login(string appName, string deviceId)
|
||||
{
|
||||
MemoryStream stream = new MemoryStream();
|
||||
BinaryWriter writer = new BinaryWriter(stream);
|
||||
|
||||
byte[] uB = Encoding.UTF8.GetBytes(username);
|
||||
byte[] pB = Encoding.UTF8.GetBytes(password);
|
||||
byte[] id = Encoding.UTF8.GetBytes(deviceId);
|
||||
byte[] app = Encoding.UTF8.GetBytes(appName);
|
||||
writer.Write((byte)MessageSendType.MESSAGE_LOGIN);
|
||||
writer.Write((byte)uB.Length);
|
||||
writer.Write(uB);
|
||||
writer.Write((byte)pB.Length);
|
||||
writer.Write(pB);
|
||||
writer.Write((byte)id.Length);
|
||||
writer.Write(id);
|
||||
writer.Write((byte)app.Length);
|
||||
writer.Write(app);
|
||||
|
||||
SendTcpMessage(stream.ToArray());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue