Ejemplo n.º 1
0
                private void StockClient_onMcpPacket(McpPacketEvent e) {
			if (e.Type == 0x03 && e.Command == 0xf0) { //即時小訊息公告(可能是伺服器發送的公告或訊息)
				MitakeNotice cNotice = Decode_MF0.Decode(e.Source);
				if (cNotice != null) {
					OnNotice(new QuoteNoticeEvent(this.DataSource, cNotice));
				}
			}
                }
Ejemplo n.º 2
0
		/// <summary>
		///   建構子
		/// </summary>
		/// <param name="Buffer">PacketBuffer 類別</param>
		public SocketToken(PacketBuffer Buffer) {
                        __cStockEvent = new StockEvent();
                        __cMcpEvent = new McpPacketEvent();

                        __cPackage = new PacketBuffer(4096);
                        __cTempBuffer = new PacketBuffer(MAX_BUFFER_SIZE);

                        if (Buffer == null) {
                                __cRecvBuffer = new PacketBuffer(MAX_BUFFER_SIZE);
                        } else {
                                __cRecvBuffer = Buffer;
                        }
                }