Created
April 22, 2010 01:47
-
-
Save cdrubin/374703 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// in the C header : | |
struct Skt_str { | |
int skt; /* skt handle */ | |
SKTEVENT port; /* associated port */ | |
int type; /* PM_SERVER, PM_CLIENT, PM_ACCEPT */ | |
char *sktname; /* name of socket */ | |
char *hostname; /* name of host */ | |
}; | |
// in my cover code : | |
Socket: cover from struct Skt_str { | |
skt: extern Int /* skt handle */ | |
port: extern UShort /* associated port */ | |
type: extern Int /* PM_SERVER, PM_CLIENT, PM_ACCEPT */ | |
sktname: extern String /* name of socket */ | |
hostname: extern String /* name of host */ | |
} | |
// and in the code I am using : | |
ResponseHandler: class extends Runnable { | |
skt: Socket* | |
run: func { | |
( "From: " + skt hostname ) println() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment