Fix typos
[TortoiseGit.git] / src / TortoisePlink / stubs / null-plug.c
blob2c41f0b7ec76848cdf1f0f21e7476c2a188b9f2a
1 /*
2 * nullplug.c: provide a null implementation of the Plug vtable which
3 * ignores all calls. Occasionally useful in cases where we want to
4 * make a network connection just to see if it works, but not do
5 * anything with it afterwards except close it again.
6 */
8 #include "putty.h"
10 void nullplug_log(Plug *plug, PlugLogType type, SockAddr *addr,
11 int port, const char *err_msg, int err_code)
15 void nullplug_closing(Plug *plug, PlugCloseType type, const char *error_msg)
19 void nullplug_receive(Plug *plug, int urgent, const char *data, size_t len)
23 void nullplug_sent(Plug *plug, size_t bufsize)
27 static const PlugVtable nullplug_plugvt = {
28 .log = nullplug_log,
29 .closing = nullplug_closing,
30 .receive = nullplug_receive,
31 .sent = nullplug_sent,
34 static Plug nullplug_plug = { &nullplug_plugvt };
37 * There's a singleton instance of nullplug, because it's not
38 * interesting enough to worry about making more than one of them.
40 Plug *const nullplug = &nullplug_plug;