send

C++ How can I send an object via socket?

丶灬走出姿态 提交于 2020-11-26 19:31:10
问题 I have a question for you. I have this class: ` #define DIMBLOCK 128 #ifndef _BLOCCO_ #define _BLOCCO_ class blocco { public: int ID; char* data; blocco(int id); }; #endif blocco::blocco(int id) { ID = id; data = new char[DIMBLOCK]; } ` and the application has a client and a server. In the main of my server I instantiate an object of this class in this way: blocco a(1); After that I open a connection between the client and the server using sockets. The question is: how can I send this object

Discord.js sending a message to a specific channel

安稳与你 提交于 2020-11-25 02:16:18
问题 I'm failing to achieve something very simple. I can't send a message to a specific channel. I've browsed trough the documentation and similar threads on stack overflow. client.channels.get().send() does NOT work. It is not a function. I also do not see it as a method on the Channel class on the official documentation yet every thread I've found so far has told me to use that. I managed to have the bot reply to a message by listening for a message and then using message.reply() but I don't

Discord.js sending a message to a specific channel

感情迁移 提交于 2020-11-25 02:14:25
问题 I'm failing to achieve something very simple. I can't send a message to a specific channel. I've browsed trough the documentation and similar threads on stack overflow. client.channels.get().send() does NOT work. It is not a function. I also do not see it as a method on the Channel class on the official documentation yet every thread I've found so far has told me to use that. I managed to have the bot reply to a message by listening for a message and then using message.reply() but I don't