mirror of
https://github.com/status-im/status-go.git
synced 2025-01-17 02:02:36 +00:00
e65760ca85
This commit adds basic syncing capabilities with peers if they are both online. It updates the work done on MVDS, but I decided to create the code in status-go instead, since it's very tight to the application (similarly the code that was the inspiration for mvds, bramble, is all tight together at the database level). I reused parts of the protobufs. The flow is: 1) An OFFER message is sent periodically with a bunch of message-ids and group-ids. 2) Anyone can REQUEST some of those messages if not present in their database. 3) The peer will then send over those messages. It's disabled by default, but I am planning to add a way to set up the flags.
36 lines
821 B
C
36 lines
821 B
C
#ifndef _ARPA_FTP_H
|
|
#define _ARPA_FTP_H
|
|
#define PRELIM 1
|
|
#define COMPLETE 2
|
|
#define CONTINUE 3
|
|
#define TRANSIENT 4
|
|
#define ERROR 5
|
|
#define TYPE_A 1
|
|
#define TYPE_E 2
|
|
#define TYPE_I 3
|
|
#define TYPE_L 4
|
|
#define FORM_N 1
|
|
#define FORM_T 2
|
|
#define FORM_C 3
|
|
#define STRU_F 1
|
|
#define STRU_R 2
|
|
#define STRU_P 3
|
|
#define MODE_S 1
|
|
#define MODE_B 2
|
|
#define MODE_C 3
|
|
#define REC_ESC '\377'
|
|
#define REC_EOR '\001'
|
|
#define REC_EOF '\002'
|
|
#define BLK_EOR 0x80
|
|
#define BLK_EOF 0x40
|
|
#define BLK_ERRORS 0x20
|
|
#define BLK_RESTART 0x10
|
|
#define BLK_BYTECOUNT 2
|
|
#ifdef FTP_NAMES
|
|
char *modenames[] = {"0", "Stream", "Block", "Compressed" };
|
|
char *strunames[] = {"0", "File", "Record", "Page" };
|
|
char *typenames[] = {"0", "ASCII", "EBCDIC", "Image", "Local" };
|
|
char *formnames[] = {"0", "Nonprint", "Telnet", "Carriage-control" };
|
|
#endif
|
|
#endif
|