Esempio n. 1
0
    public static ConnectionWriter createBufferedConnectionWriter()
    {
        global::System.IntPtr cPtr = yarpPINVOKE.ConnectionWriter_createBufferedConnectionWriter();
        ConnectionWriter      ret  = (cPtr == global::System.IntPtr.Zero) ? null : new ConnectionWriter(cPtr, false);

        return(ret);
    }
Esempio n. 2
0
    public virtual ConnectionWriter getWriter()
    {
        global::System.IntPtr cPtr = yarpPINVOKE.ConnectionReader_getWriter(swigCPtr);
        ConnectionWriter      ret  = (cPtr == global::System.IntPtr.Zero) ? null : new ConnectionWriter(cPtr, false);

        return(ret);
    }
 public ConnectionTradingOnServer(TcpClient client, TradingRequestHandler handler)
 {
     this.client            = client;
     this.connection_reader = new ConnectionReader(new BinaryReader(client.GetStream()), this);
     this.connection_writer = new ConnectionWriter(new BinaryWriter(client.GetStream()));
     this.handler           = handler;
 }
Esempio n. 4
0
    public static bool writePair(ConnectionWriter connection, Portable head, Portable body)
    {
        bool ret = yarpPINVOKE.PortablePairBase_writePair(ConnectionWriter.getCPtr(connection), Portable.getCPtr(head), Portable.getCPtr(body));

        if (yarpPINVOKE.SWIGPendingException.Pending)
        {
            throw yarpPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
Esempio n. 5
0
    public new bool write(ConnectionWriter connection)
    {
        bool ret = yarpPINVOKE.Things_write(swigCPtr, ConnectionWriter.getCPtr(connection));

        if (yarpPINVOKE.SWIGPendingException.Pending)
        {
            throw yarpPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
Esempio n. 6
0
    public new bool write(ConnectionWriter writer)
    {
        bool ret = yarpPINVOKE.Property_write(swigCPtr, ConnectionWriter.getCPtr(writer));

        if (yarpPINVOKE.SWIGPendingException.Pending)
        {
            throw yarpPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
Esempio n. 7
0
        private void SendFile(object obj)
        {
            Connection       c      = (Connection)obj;
            ConnectionStream stream = new ConnectionStream(c);

            using (FileStream fs = File.OpenRead(_answerSoundFileName)) {
                using (ConnectionWriter writer = new ConnectionWriter(stream)) {
                    writer.Write(fs);
                }
            }
        }
Esempio n. 8
0
        private void SendTextToSpeech(object obj)
        {
            Connection        c      = (Connection)obj;
            ConnectionStream  stream = new ConnectionStream(c);
            SpeechSynthesizer s      = new SpeechSynthesizer();

            using (MemoryStream memStream = new MemoryStream()) {
                s.SetOutputToAudioStream(memStream, new SpeechAudioFormatInfo(EncodingFormat.ALaw,
                                                                              8000, 8, 1, 8000, 1, null));
                s.Speak(_textToSpeak);
                memStream.Seek(0, SeekOrigin.Begin);

                using (ConnectionWriter writer = new ConnectionWriter(stream)) {
                    writer.Reverse = true;
                    writer.Write(memStream);
                }
            }
        }
Esempio n. 9
0
 public new bool write(ConnectionWriter connection) {
   bool ret = yarpPINVOKE.Image_write(swigCPtr, ConnectionWriter.getCPtr(connection));
   if (yarpPINVOKE.SWIGPendingException.Pending) throw yarpPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
Esempio n. 10
0
 public new bool write(ConnectionWriter connection)
 {
     bool ret = yarpPINVOKE.Portable_write(swigCPtr, ConnectionWriter.getCPtr(connection));
     if (yarpPINVOKE.SWIGPendingException.Pending) throw yarpPINVOKE.SWIGPendingException.Retrieve();
     return ret;
 }
 internal static HandleRef getCPtr(ConnectionWriter obj)
 {
     return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 }
Esempio n. 12
0
 public new bool write(ConnectionWriter writer)
 {
     bool ret = yarpPINVOKE.Bottle_write__SWIG_0(swigCPtr, ConnectionWriter.getCPtr(writer));
     if (yarpPINVOKE.SWIGPendingException.Pending) throw yarpPINVOKE.SWIGPendingException.Retrieve();
     return ret;
 }
 public static bool writePair(ConnectionWriter connection, Portable head, Portable body)
 {
     bool ret = yarpPINVOKE.PortablePairBase_writePair(ConnectionWriter.getCPtr(connection), Portable.getCPtr(head), Portable.getCPtr(body));
     if (yarpPINVOKE.SWIGPendingException.Pending) throw yarpPINVOKE.SWIGPendingException.Retrieve();
     return ret;
 }
 public ConnectionWriter getWriter()
 {
     ConnectionWriter ret = new ConnectionWriter(yarpPINVOKE.DummyConnector_getWriter(swigCPtr), false);
     return ret;
 }
Esempio n. 15
0
        private void SendTextToSpeech(object obj) {
            Connection c = (Connection)obj;
            ConnectionStream stream = new ConnectionStream(c);
            SpeechSynthesizer s = new SpeechSynthesizer();
            using (MemoryStream memStream = new MemoryStream()) {
                s.SetOutputToAudioStream(memStream, new SpeechAudioFormatInfo(EncodingFormat.ALaw,
                    8000, 8, 1, 8000, 1, null));
                s.Speak(_textToSpeak);
                memStream.Seek(0, SeekOrigin.Begin);

                using (ConnectionWriter writer = new ConnectionWriter(stream)) {
                    writer.Reverse = true;
                    writer.Write(memStream);
                }
            }
        }
Esempio n. 16
0
 private void SendFile(object obj) {
     Connection c = (Connection)obj;
     ConnectionStream stream = new ConnectionStream(c);
     using (FileStream fs = File.OpenRead(_answerSoundFileName)) {
         using (ConnectionWriter writer = new ConnectionWriter(stream)) {
             writer.Write(fs);
         }
     }
 }
Esempio n. 17
0
    public ConnectionWriter getWriter()
    {
        ConnectionWriter ret = new ConnectionWriter(yarpPINVOKE.DummyConnector_getWriter(swigCPtr), false);

        return(ret);
    }
Esempio n. 18
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ConnectionWriter obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }
Esempio n. 19
0
        public void SetUp()
        {
            ConnectionWriter connectionWriter = new ConnectionWriter();

            connectionWriter.Start();
        }