mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -05:00
Created a shiny new abstraction for the socket handling. Has many
advantages: - protocol modules can call sk_write() without having to worry about writes blocking, because blocking writes are handled in the abstraction layer and retried later. - `Lost connection while sending' is a thing of the past. - <winsock.h> is no longer needed in most modules, because "putty.h" doesn't have to declare `SOCKET' variables any more, only the abstracted `Socket' type. - select()-equivalent between multiple sockets will now be handled sensibly, which opens the way for things like SSH port forwarding. [originally from svn r744]
This commit is contained in:
7
putty.h
7
putty.h
@ -1,6 +1,8 @@
|
||||
#ifndef PUTTY_PUTTY_H
|
||||
#define PUTTY_PUTTY_H
|
||||
|
||||
#include "network.h"
|
||||
|
||||
#define PUTTY_REG_POS "Software\\SimonTatham\\PuTTY"
|
||||
#define PUTTY_REG_PARENT "Software\\SimonTatham"
|
||||
#define PUTTY_REG_PARENT_CHILD "PuTTY"
|
||||
@ -104,12 +106,11 @@ typedef enum {
|
||||
} VT_Mode;
|
||||
|
||||
typedef struct {
|
||||
char *(*init) (HWND hwnd, char *host, int port, char **realhost);
|
||||
int (*msg) (WPARAM wParam, LPARAM lParam);
|
||||
char *(*init) (char *host, int port, char **realhost);
|
||||
void (*send) (char *buf, int len);
|
||||
void (*size) (void);
|
||||
void (*special) (Telnet_Special code);
|
||||
SOCKET (*socket) (void);
|
||||
Socket (*socket) (void);
|
||||
int (*sendok) (void);
|
||||
int default_port;
|
||||
} Backend;
|
||||
|
Reference in New Issue
Block a user