예제 #1
0
파일: Stream.cs 프로젝트: jesumarquez/lt
        public void StartReceiver()
        {
            TRACE("START RECEIVER");
            receiver_running = true;
            var block = new StreamBlock
            {
                ContentType = StreamBlock.ContentTypes.StreamData,
                Data        = new byte[MaxBlockSize],
                TotalBytes  = MaxBlockSize
            };

            os_socket.BeginReceive(block.Data, 0, block.TotalBytes, 0, ReadAsyncResult, block);
        }
예제 #2
0
파일: Stream.cs 프로젝트: jesumarquez/lt
 /// <summary>
 /// callback, este metodo es llamado cuando se reciben datos por el socket.
 /// </summary>
 public abstract void OnReceive(StreamBlock block);
예제 #3
0
파일: Stream.cs 프로젝트: jesumarquez/lt
 public virtual void EnqueueBlock(StreamBlock block)
 {
     TRACE("ENQUEUE BLOCK [{0}] OF {1} BYTES", block.ContentType, block.TotalBytes);
     outgoing_stream.Enqueue(block);
 }
예제 #4
0
 public override void OnReceive(StreamBlock block)
 {
     TRACE("SERVER ON RECEIVE");
     Target.EnqueueBlock(block);
 }
예제 #5
0
 public override void OnReceive(StreamBlock block)
 {
     TRACE("CLIENT ON RECEIVE");
     Source.EnqueueBlock(block);
 }