// 채팅 보내기 private void button5_Click(object sender, EventArgs e) { var request = new JsonPacketRequestChat() { chat = textBoxSendChat.Text }; string jsonstring = Newtonsoft.Json.JsonConvert.SerializeObject(request); byte[] bodyData = Encoding.UTF8.GetBytes(jsonstring); PostSendPacket((UInt16)PACKET_ID_CHAT, bodyData); }
// 채팅 보내기 private void button5_Click(object sender, EventArgs e) { if (ClientStatus != CLIENT_STATUS.LOBBY) { MessageBox.Show("채팅은 로비에 입장해야만 가능합니다"); return; } var request = new JsonPacketRequestChat() { LobbyID = textBoxLobbyID.Text.ToInt16(), UserID = textBoxUserID.Text, Chat = textBoxSendChat.Text }; var bodyData = JsonEnDecode.Encode<JsonPacketRequestChat>(request); PostSendPacket((UInt16)PACKET_ID.REQUEST_CHAT, bodyData); }