Ejemplo n.º 1
0
        public void OnInstanceCreated(VSLSocket socket)
        {
            vslClient = (VSLClient)socket;
#if DEBUG
            vslClient.LogHandler = Program.Log;
#endif
        }
Ejemplo n.º 2
0
        public override void OnInstanceCreated(VSLSocket socket)
        {
            base.OnInstanceCreated(socket);

            vsl.FileTransfer.Request += Vsl_FileTransferRequested;
#if DEBUG
            vsl.LogHandler = Program.Log;
#endif
        }
Ejemplo n.º 3
0
 //  fields>
 // <constructor
 internal NetworkManager(VSLSocket parent, RSAParameters rsaKey)
 {
     this.parent           = parent;
     this.settings         = parent.Settings;
     this.channel          = parent.Channel;
     this.handler          = parent.Handler;
     this.exceptionHandler = parent.ExceptionHandler;
     this.rsaKey           = rsaKey;
     writePacketLock       = new object();
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Assigns this <see cref="FTEventArgs"/> to a <see cref="FTSocket"/>. If it is already assigned, the method returns false.
 /// </summary>
 /// <param name="parent"></param>
 /// <param name="socket"></param>
 /// <returns>Whether the assignment was successful.</returns>
 /// <exception cref="ArgumentNullException"/>
 internal bool Assign(VSLSocket parent, FTSocket socket)
 {
     if (this.parent == null || this.socket == null)
     {
         this.parent = parent ?? throw new ArgumentNullException(nameof(parent));
         this.socket = socket ?? throw new ArgumentNullException(nameof(socket));
         return(true);
     }
     else
     {
         return(false);
     }
 }
Ejemplo n.º 5
0
 public void OnInstanceCreated(VSLSocket socket)
 {
     vsl = (VSLClient)socket;
 }
Ejemplo n.º 6
0
 public virtual void OnInstanceCreated(VSLSocket socket)
 {
     vsl = (VSLServer)socket;
 }
Ejemplo n.º 7
0
        //  fields>

        // <constructor
        protected PacketHandler(VSLSocket parent)
        {
            this.parent = parent;
        }
Ejemplo n.º 8
0
 internal FTSocket(VSLSocket parent)
 {
     this.parent = parent;
 }
Ejemplo n.º 9
0
 public void OnInstanceCreated(VSLSocket socket)
 {
 }
Ejemplo n.º 10
0
 public static void Log(VSLSocket socket, string message)
 {
     Console.WriteLine($"[{socket.GetType()}] {message}");
 }