public SendingFileParas imethod_0(string string_0) { try { P2PChannelState state = this.ip2PController_0.GetP2PChannelState(string_0); if (state == null) { return(new SendingFileParas(0x800, 0)); } if (state.ProtocolType == ProtocolType.UDP) { OutUdpSessionState outUdpSessionState = this.ip2PController_0.GetUdpSessionStateViewer().GetOutUdpSessionState(state.DestIPE.IPEndPoint_0); if (outUdpSessionState != null) { return(new SendingFileParas(outUdpSessionState.PMTU - 150, 0)); } } if (state.Boolean_0 && (state.ProtocolType == ProtocolType.TCP)) { return(new SendingFileParas(0x5000, 0)); } return(new SendingFileParas(0x800, 0)); } catch (Exception) { return(new SendingFileParas(0x800, 0)); } }
public bool SendMessage(string string_2, IMessageHandler interface37_0, bool bool_3, ActionTypeOnChannelIsBusy actionTypeOnChannelIsBusy_0) { if (this.class83_0 == null) { return(false); } P2PChannelState state = this.safeDictionary_0.Get(string_2); if (!((state != null) && state.Enabled)) { return(false); } try { if (bool_3) { this.class83_0.PostMessageToClient(state.DestIPE.IPEndPoint_0, interface37_0, actionTypeOnChannelIsBusy_0); } else { this.class83_0.SendMessageToClient(state.DestIPE.IPEndPoint_0, interface37_0, actionTypeOnChannelIsBusy_0); } state.MessageSent(); return(true); } catch (Exception exception) { this.emptyAgileLogger_0.Log(exception, "CJPlus.Application.P2PSession.Passive.Udp.UdpChannelManager.SendMessage", ErrorLevel.High); return(false); } }
public bool SendMessage(string string_1, IMessageHandler interface37_0, bool bool_1, ActionTypeOnChannelIsBusy actionTypeOnChannelIsBusy_0) { P2PChannelState state = this.safeDictionary_0.Get(string_1); if (!((state != null) && state.Enabled)) { return(false); } try { if (this.class18_0.method_7(string_1)) { this.class18_0.CoNbnqugPr(string_1, interface37_0, bool_1, actionTypeOnChannelIsBusy_0); } else { this.class125_0.method_10(string_1, interface37_0, bool_1, actionTypeOnChannelIsBusy_0); } state.MessageSent(); return(true); } catch (Exception exception) { this.emptyAgileLogger_0.Log(exception, "CJPlus.Application.P2PSession.Passive.Tcp.TcpChannelManager.SendMessage", ErrorLevel.High); return(false); } }
private void method_3(P2PChannelState p2PChannelState_0) { if (p2PChannelState_0.Reliable) { this.class2_0.imethod_8(p2PChannelState_0.DestUserID); this.class13_0.imethod_11(p2PChannelState_0.DestUserID); } }
public void OnFeedbackVacancyReceived(string string_2, FeedbackVacancyBody feedbackVacancyBody_0) { P2PChannelState state = this.safeDictionary_0.Get(string_2); if ((state != null) && (this.FeedbackVacancyReceived != null)) { this.FeedbackVacancyReceived(state.DestIPE.IPEndPoint_0, feedbackVacancyBody_0); } }
public void OnPMTUTestAckReceived(string string_2, ushort ushort_0) { P2PChannelState state = this.safeDictionary_0.Get(string_2); if ((state != null) && (this.PMTUTestAckReceived != null)) { this.PMTUTestAckReceived(state.DestIPE.IPEndPoint_0, string_2, ushort_0); } }
public P2PChannelState GetP2PChannelState(string destUserID) { P2PChannelState state = this.class42_0.GetP2PChannelState(destUserID); if (state == null) { state = this.class57_0.GetP2PChannelState(destUserID); } return(state); }
private void OnP2PChannelClosed(string string_1) { P2PChannelState state = this.safeDictionary_0.Get(string_1); if (state != null) { this.safeDictionary_0.Remove(string_1); this.P2PChannelClosed(state); } }
private void OnP2PChannelClosed(Interface17 interface17_0, SessionClosedCause sessionClosedCause_0) { if (interface17_0.imethod_0()) { P2PChannelState state = this.safeDictionary_0.Get(interface17_0.imethod_2()); if (state != null) { this.safeDictionary_0.Remove(interface17_0.imethod_2()); this.P2PChannelClosed(state); } } }
public void Close(string string_2) { if (this.class83_0 != null) { P2PChannelState state = this.safeDictionary_0.Get(string_2); if (state != null) { this.class83_0.GetIUdpSessionHelper().imethod_3(state.DestIPE.IPEndPoint_0); this.safeDictionary_0.Remove(string_2); this.P2PChannelClosed(state); } } }
public bool?method_13(string string_2) { if (this.class83_0 == null) { return(null); } P2PChannelState state = this.GetP2PChannelState(string_2); if (state == null) { return(null); } return(new bool?(this.class83_0.GetIUdpSessionHelper().imethod_2(state.DestIPE.IPEndPoint_0))); }
private void OnP2PChannelOpened(Interface17 interface17_0) { if (interface17_0.imethod_0()) { P2PChannelState state = new P2PChannelState(interface17_0.imethod_2(), ProtocolType.UDP, new AgileIPE(interface17_0.imethod_1()), DateTime.Now, true, false) { Enabled = this.bool_2 }; bool flag = this.safeDictionary_0.Contains(interface17_0.imethod_2()); this.safeDictionary_0.Add(interface17_0.imethod_2(), state); if (!flag) { this.P2PChannelOpened(state); } } }
private void OnP2PChannelOpened(string string_1, IPEndPoint ipendPoint_0, bool bool_1) { P2PChannelState state = new P2PChannelState(string_1, ProtocolType.TCP, new AgileIPE(ipendPoint_0), DateTime.Now, true, bool_1) { Enabled = this.bool_0 }; this.safeDictionary_0.Add(string_1, state); this.P2PChannelOpened(state); IMessageHandler interface3 = ((IStreamContractHelper)this.object_0.GetStreamContract()).imethod_4 <Class110>(this.string_0, this.p2PSessionMessageTypeRoom_0.TcpP2PChannelTest, null, string_1); IMessageHandler interface4 = this.object_0.imethod_11().GetMessageForbidden().imethod_3(interface3); this.SendMessage(string_1, interface4, false, ActionTypeOnChannelIsBusy.Continue); }
void P2PController_P2PChannelOpened(P2PChannelState state) { this.P2PChannelReport(true, state.DestUserID); }
void P2PController_P2PChannelClosed(P2PChannelState state) { this.P2PChannelReport(false, state.DestUserID); }
private void method_10(P2PChannelState p2PChannelState_0) { this.eventSafeTrigger_0.ActionAsyn <P2PChannelState>("P2PChannelClosed", this.P2PChannelClosed, p2PChannelState_0); }
private void OnP2PChannelOpened(P2PChannelState p2PChannelState_0) { this.eventSafeTrigger_0.ActionAsyn <P2PChannelState>("P2PChannelOpened", this.P2PChannelOpened, p2PChannelState_0); }