![]() This function installs a callback function which will be called on every Telnet disconnect of this object (except rejected connect tries). void setCallbackOnDisconnect(void (*callback)()) Use NULL to remove the callback.ĭefault: NULL void setCallbackOnConnect(void (*callback)()) 15. ![]() This function installs a callback function which will be called on every Telnet connect of this object (except rejected connect tries). void setCallbackOnConnect(void (*callback)()) This function returns true if a Telnet client is connected. ![]() Set the serial port you want to use with this object (especially for ESP32) or NULL if no serial port should be used (Telnet only).ĭefault: Serial void setSerial(HardwareSerial* usedSerial) 13. void setSerial(HardwareSerial* usedSerial) Use 0 as parameter to disable pings.ĭefault: 1500 void setPingTime(uint16_t pngTime) 12. Use setPingTime to define the time (in ms) without traffic after which a ping aka a chr(0) is sent to the Telnet client to detect a disconnect earlier. If no data is sent via TelnetSpy, the detection of a disconnected client has a long timeout. Get actual state of storing data when offline. You can do this by disabling storeOffline for sending unimportant data.ĭefault: true void setStoreOffline(bool store) 10. This function allows you to store important data only. void setStoreOffline(bool store)Įnable / disable storing new data in the ring buffer if no Telnet connection is established. This function returns the actual size of the ring buffer. Returns false if the requested buffer size cannot be set.ĭefault: 3000 bool setBufferSize(uint16_t newSize) 8. If the new buffer size is too small, only the latest data will be preserved. Changing size tries to preserve the already collected data. bool setBufferSize(uint16_t newSize)Ĭhange the size of the ring buffer. void setMaxBlockSize(uint16_t maxSize)Ĭhange the maximum size of the Telnet packets to send.ĭefault: 512 void setMaxBlockSize(uint16_t maxSize) 7. void setCollectingTime(uint16_t colTime)Ĭhange the time (in ms) to wait before sending a Telnet block if it's size is less than (defined by setMinBlockSize).ĭefault: 100 void setCollectingTime(uint16_t colTime) 6. void setMinBlockSize(uint16_t minSize)Ĭhange the amount of characters to collect before sending a Telnet block.ĭefault: 64 void setMinBlockSize(uint16_t minSize) 5. void setRejectMsg(char* msg)Ĭhange the message which will be sent to the Telnet client if another session is already established.ĭefault: "TelnetSpy: Only one connection possible.\n" void setRejectMsg(char* msg) 4. void setWelcomeMsg(char* msg)Ĭhange the message which will be sent to the Telnet client after a session is established.ĭefault: "Connection established via TelnetSpy.\n" void setWelcomeMsg(char* msg) 3. If a client is already connected, it will be disconnected.ĭefault: 23 void setPort(uint16_t portToUse) 2. For example - To send control information on the first instance and data dumps on the second instance.Īdd the following line to your sketch: #include Īdd the following line to your initialisation block void setup(): LOG.begin() Īdd the following line at the beginning of your main loop void loop(): LOG.handle() Use the following functions of the TelnetSpy object to modify behaviorĬhange the port number of this Telnet server.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |