コード例 #1
0
ファイル: Client.cs プロジェクト: saroque/server
 public Client(Socket socket, Server server)
 {
     Socket = socket;
     Server = server;
     ConnectionId = GlobalConnectionManifest.GetNewConnectionId();
     Logger.InfoFormat("Connection {0} from {1}:{2}", ConnectionId,
         ((IPEndPoint)Socket.RemoteEndPoint).Address.ToString(),
         ((IPEndPoint)Socket.RemoteEndPoint).Port);
     Thread = new Thread(ClientLoop);
     Connected = true;
     EncryptionKey = Encoding.ASCII.GetBytes("UrkcnItnI");
     EncryptionKeyTable = new byte[1024];
     LastReceived = DateTime.Now.Ticks;
     GlobalConnectionManifest.RegisterClient(this);
     ConnectedSince = DateTime.Now.Ticks;
 }
コード例 #2
0
ファイル: Server.cs プロジェクト: DomGrieco/server
 public Redirect(Client client, Server source, Server destination, string name, byte seed, byte[] key)
 {
     Id = id++;
     Client = client;
     Source = source;
     Destination = destination;
     Name = name;
     EncryptionSeed = seed;
     EncryptionKey = key;
 }