예제 #1
0
파일: Tunneler.cs 프로젝트: NTDLS/NetTunnel
        void ProcessReceivedData(SocketState connection, byte[] buffer, int bufferSize)
        {
            //Console.WriteLine("--Send:{0}, Packet: {1}", tunnel.Name, Encoding.UTF8.GetString(buffer.Take(bufferSize).ToArray()));

            byte[] sendBuffer = Packetizer.AssembleMessagePacket(buffer, bufferSize, false, null, null);
            connection.Peer.Socket.Send(sendBuffer, sendBuffer.Length, SocketFlags.None);
        }
예제 #2
0
파일: Tunneler.cs 프로젝트: NTDLS/NetTunnel
 private void SendPacketEnvelope(SocketState connection, PacketEnvelope envelope)
 {
     byte[] sendBuffer = Packetizer.AssembleMessagePacket(envelope, false, null, null);
     connection.Socket.Send(sendBuffer, sendBuffer.Length, SocketFlags.None);
 }
예제 #3
0
파일: Tunneler.cs 프로젝트: NTDLS/NetTunnel
 private void SendPacketEnvelope(SocketState connection, PacketEnvelope envelope, string encryptionKey, string salt)
 {
     byte[] sendBuffer = Packetizer.AssembleMessagePacket(envelope, true, encryptionKey, salt);
     connection.Socket.Send(sendBuffer, sendBuffer.Length, SocketFlags.None);
 }