SIPSorcery.SIP.SilverlightTCPSIPChannel.Send C# (CSharp) Method

Send() public method

public Send ( IPEndPoint destinationEndPoint, byte buffer ) : void
destinationEndPoint System.Net.IPEndPoint
buffer byte
return void
        public override void Send(IPEndPoint destinationEndPoint, byte[] buffer)
        {
            if (destinationEndPoint.ToString() != m_remoteEndPoint.ToString())
            {
                throw new ApplicationException("The SilverlightTCPSIPChannel can only send to a single server socket. The current connection is to " + m_remoteEndPoint + ", the request to send was to " + destinationEndPoint + ".");
            }
            else if (!m_isConnected)
            {
                throw new ApplicationException("The SilverlightTCPSIPChannel cannot send as it is in a disconnected state.");
            }

            try
            {
                SocketAsyncEventArgs sendArgs = new SocketAsyncEventArgs();
                sendArgs.SetBuffer(buffer, 0, buffer.Length);
                m_socket.SendAsync(sendArgs);
            }
            catch (Exception excp)
            {
                logger.Error("Exception SilverlightTCPSIPChannel Send. " + excp.Message);
                SIPSocketDisconnected(m_remoteEndPoint);
            }
        }

Same methods

SilverlightTCPSIPChannel::Send ( IPEndPoint dstEndPoint, byte buffer, string serverCN ) : void
SilverlightTCPSIPChannel::Send ( IPEndPoint destinationEndPoint, string message ) : void
SilverlightTCPSIPChannel::Send ( string message ) : void