Beispiel #1
0
 public static string ToString(this Packet.Types t)
 {
     return(Enum.GetName(typeof(Packet.Types), t));
 }
Beispiel #2
0
 /// <summary> This method creates a new Packet using a type and string, say for brackets
 /// </summary>
 /// <returns>javaflow.Packet
 /// </returns>
 /// <param name="s">java.lang.String
 ///
 /// </param>
 public virtual Packet Create(Packet.Types newType, string s)
 {
     Interlocked.Increment(ref Network.creates);
     return(new Packet(newType, s, this));
 }
 /// <summary>
 /// Creates a new instance
 /// </summary>
 /// <param name="data">The packet data</param>
 /// <param name="incoming">True for incoming, false for outgoing packet.</param>
 public PacketEventArgs(byte[] data, bool incoming, Packet.Types type)
 {
     this.Data     = data;
     this.Incoming = incoming;
     this.Type     = type;
 }