public SendTo ( Server.Network.NetState state ) : void | ||
state | Server.Network.NetState | |
Résultat | void |
public static void CloseAndSendGump(NetState ns, Gump g, params Type[] types) { if (ns == null) return; for (int i = 0; i < types.Length; ++i) ns.Send(new CloseGump(Gump.GetTypeID(types[i]), 0)); g.SendTo(ns); /*ns.AddGump( g ); Packet[] packets = new Packet[types.Length + 1]; for ( int i = 0; i < types.Length; ++i ) packets[i] = new CloseGump( Gump.GetTypeID( types[i] ), 0 ); packets[types.Length] = (Packet) typeof( Gump ).InvokeMember( "Compile", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.InvokeMethod, null, g, null, null ); bool compress = ns.CompressionEnabled; ns.CompressionEnabled = false; ns.Send( BindPackets( compress, packets ) ); ns.CompressionEnabled = compress;*/ }
public bool SendGump( Gump g, bool throwOnOffline ) { if ( m_NetState != null ) { g.SendTo( m_NetState ); return true; } else if ( throwOnOffline ) { throw new MobileNotConnectedException( this, "Gump could not be sent." ); } else { return false; } }
public bool SendGump( Gump g, bool throwOnOffline = false ) { if ( m_Client == null ) { if ( throwOnOffline ) throw new MobileNotConnectedException( this, "Gump could not be sent." ); return false; } g.SendTo( m_Client ); return true; }