aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs b/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs
index 78f231a..e8d1889 100644
--- a/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs
+++ b/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs
@@ -1,6 +1,7 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Net; 3using System.Net;
4using System.Net.Sockets;
4using System.Text; 5using System.Text;
5using OpenMetaverse; 6using OpenMetaverse;
6using OpenMetaverse.Packets; 7using OpenMetaverse.Packets;
@@ -11,6 +12,26 @@ namespace OpenSim.Client.Sirikata.ClientStack
11{ 12{
12 class SirikataClientView : IClientAPI, IClientCore 13 class SirikataClientView : IClientAPI, IClientCore
13 { 14 {
15 private readonly NetworkStream stream;
16
17 public SirikataClientView(TcpClient client)
18 {
19 stream = client.GetStream();
20
21 sessionId = UUID.Random();
22
23
24 // Handshake with client
25 string con = "SSTTCP01" + sessionId;
26 byte[] handshake = Util.UTF8.GetBytes(con);
27
28 byte[] clientHandshake = new byte[2+6+36];
29
30 stream.Read(clientHandshake, 0, handshake.Length);
31 stream.Write(handshake, 0, handshake.Length - 1); // Remove null terminator (hence the -1)
32 }
33
34
14 #region Implementation of IClientAPI 35 #region Implementation of IClientAPI
15 36
16 private Vector3 startPos; 37 private Vector3 startPos;