2012-08-15 20:46:55 -05:00
|
|
|
struct socket {
|
2012-06-06 23:52:41 -05:00
|
|
|
let sock: int;
|
|
|
|
|
|
|
|
new() { self.sock = 1; }
|
|
|
|
|
|
|
|
drop { }
|
|
|
|
|
|
|
|
fn set_identity() {
|
2012-07-04 14:04:28 -05:00
|
|
|
do closure {
|
2012-06-06 23:52:41 -05:00
|
|
|
setsockopt_bytes(copy self.sock)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn closure(f: fn()) { f() }
|
|
|
|
|
|
|
|
fn setsockopt_bytes(_sock: int) { }
|
|
|
|
|
|
|
|
fn main() {}
|