Пример #1
0
 public Response SendMessage(MessageUM MSG)
 {
     try
     {
         var sendingdata = MessageHandle.PrepareDataforSending(MSG, _Encoding, _Sockettype, WebSocketSecKey);
         _ClientSocket.Send(sendingdata);
         return(new Response
         {
             code = ResponseStatus.Sent,
             text = ""
         });
     }
     catch (Exception e)
     {
         Console.WriteLine("Error In SendMessage Method : " + e.Message);
         return(new Response
         {
             code = ResponseStatus.CanNotSend,
             text = e.Message
         });
     }
 }