-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
110 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#ifndef _fast_memory_h_ | ||
#define _fast_memory_h_ | ||
|
||
struct _Handle | ||
{ | ||
void *pointer; | ||
Word attr; | ||
Word owner; | ||
LongWord size; | ||
}; | ||
|
||
#define _HLock(h) ((struct _Handle *)h)->attr |= 0x8000 | ||
#define _HUnlock(h) ((struct _Handle *)h)->attr &= 0x7fff | ||
#define _GetHandleSize(h) ((struct _Handle *)h)->size | ||
|
||
#endif |