server.Send(e.Guid, "", new object()); How to get this method ?

Jul 16, 2011 at 8:10 AM

How to Send data from server to client

The method 'server.Send()' ,How to get ??

 

 public abstract void Send(T data);




        /// <summary>
        /// Sends strictly typed data to the stream.
        /// </summary>
        /// <param name="data">The type of data.</param>
        public abstract void Send(T data);
        
        /// <summary>
        /// Sends a raw byte array to the stream.
        /// </summary>
        /// <param name="data"></param>
        protected void SendRaw(byte[] data)
        {
            byte[] bytes = data;
            if (IsActive && stream.CanWrite)
            {
                try
                {
                    stream.Write(bytes, 0, bytes.Length);
                    DataSent += bytes.LongLength;
                }
                catch (SocketException ex)
                {
                    Stop(NetStoppedReason.Remote);
                    return;
                }
            }
        }