Esempio n. 1
0
        //--------------------------------------------


        public override void StartSend()
        {
#if DEBUG
            //System.Diagnostics.Debug.WriteLine("start send");
            _sendComplete = false;
#endif
            _sendIO.StartSendAsync();///***
        }
 void StartSend()
 {
     if (isSend)
     {
         return;
     }
     isSend = true;
     sendIO.StartSendAsync();
 }
Esempio n. 3
0
        public void StartSend(byte[] sendBuffer, int start, int len, Action whenSendCompleted)
        {
            //must be in opened state
            if (_workingState != WorkingState.Rest)
            {
                throw new Exception("sending error: state is not= opened");
            }
            //--------------------------------------------------------------
#if DEBUG
            if (this.whenSendCompleted != null)
            {
                //must be null
                throw new Exception("sending something?...");
            }
#endif
            this.whenSendCompleted = whenSendCompleted;
            this._workingState     = WorkingState.Sending;
            sendIO.EnqueueOutputData(sendBuffer, len);
            sendIO.StartSendAsync();
        }
Esempio n. 4
0
 public void Write(string content)
 {
     byte[] dataToSend = CreateSendBuffer(content);
     sendIO.EnqueueOutputData(dataToSend, dataToSend.Length);
     sendIO.StartSendAsync();
 }
Esempio n. 5
0
 public void SendIOStartSend() => _sendIO.StartSendAsync();
Esempio n. 6
0
 internal void SendExternalRaw(byte[] data)
 {
     sendIO.EnqueueOutputData(data, data.Length);
     sendIO.StartSendAsync();
 }