コード例 #1
0
 public void SendPresence(Presence status)
 {
     underlyingSocket.Send(new PresenceChange()
     {
         presence = Presence.active, user = base.MySelf.id
     });
 }
コード例 #2
0
        public void SendMessage(Action <MessageReceived> onSent, string channelId, string textData,
                                string userName = null)
        {
            if (userName == null)
            {
                userName = MySelf.id;
            }

            if (onSent != null)
            {
                underlyingSocket.Send(
                    new Message {
                    channel = channelId, text = textData, user = userName, type = "message"
                }, onSent);
            }
            else
            {
                underlyingSocket.Send(new Message
                {
                    channel = channelId, text = textData, user = userName, type = "message"
                });
            }
        }