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

            vsl.FileTransfer.Request += Vsl_FileTransferRequested;
#if DEBUG
            vsl.LogHandler = Program.Log;
#endif
        }
Example #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();
 }
Example #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);
     }
 }
Example #5
0
 public void OnInstanceCreated(VSLSocket socket)
 {
     vsl = (VSLClient)socket;
 }
Example #6
0
 public virtual void OnInstanceCreated(VSLSocket socket)
 {
     vsl = (VSLServer)socket;
 }
Example #7
0
        //  fields>

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