public void OnInstanceCreated(VSLSocket socket) { vslClient = (VSLClient)socket; #if DEBUG vslClient.LogHandler = Program.Log; #endif }
public override void OnInstanceCreated(VSLSocket socket) { base.OnInstanceCreated(socket); vsl.FileTransfer.Request += Vsl_FileTransferRequested; #if DEBUG vsl.LogHandler = Program.Log; #endif }
// 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(); }
/// <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); } }
public void OnInstanceCreated(VSLSocket socket) { vsl = (VSLClient)socket; }
public virtual void OnInstanceCreated(VSLSocket socket) { vsl = (VSLServer)socket; }
// fields> // <constructor protected PacketHandler(VSLSocket parent) { this.parent = parent; }
internal FTSocket(VSLSocket parent) { this.parent = parent; }
public void OnInstanceCreated(VSLSocket socket) { }
public static void Log(VSLSocket socket, string message) { Console.WriteLine($"[{socket.GetType()}] {message}"); }