mirror of
https://github.com/ksherlock/gopher.git
synced 2024-12-21 21:29:19 +00:00
40 lines
737 B
C
40 lines
737 B
C
#ifndef __CONNECT_H__
|
|
#define __CONNECT_H__
|
|
|
|
#ifndef __TCPIP__
|
|
#include <tcpip.h>
|
|
#endif
|
|
|
|
enum {
|
|
kConnectionStateDNR = 1,
|
|
kConnectionStateConnecting,
|
|
kConnectionStateConnected,
|
|
kConnectionStateDisconnecting,
|
|
kConnectionStateDisconnected,
|
|
kConnectionStateError
|
|
};
|
|
|
|
typedef struct Connection {
|
|
Word memID;
|
|
Word ipid;
|
|
Word terr;
|
|
Word state;
|
|
dnrBuffer dnr;
|
|
Word port;
|
|
} Connection;
|
|
|
|
|
|
|
|
void ConnectionInit(Connection *, Word memID);
|
|
|
|
Word ConnectionOpen(Connection *, const char *host, Word port);
|
|
Word ConnectionOpenC(Connection *, const char *host, Word port);
|
|
Word ConnectionOpenGS(Connection *, const GSString255 *host, Word port);
|
|
|
|
Word ConnectionClose(Connection *);
|
|
Word ConnectionPoll(Connection *);
|
|
|
|
|
|
|
|
#endif
|