protected virtual Socket CreateSocket(IPcb pcb) { if (pcb == null) { return(null); } return(new Socket(pcb)); }
public Socket(IPcb pcb) { this.m_poPCB = pcb ?? throw new ArgumentNullException(nameof(pcb)); this.m_poPCB.Open += (sender, e) => this.OnOpen(e); this.m_poPCB.Abort += (sender, e) => { this.OnAbort(e); this.Close(); }; this.m_poPCB.Message += (sender, e) => this.OnMessage(e); }
public virtual Socket EndAccept(IPcb pcb) { return(CreateSocket(pcb)); }
public virtual bool BeginAccept(IPcb pcb) { return(pcb != null); }