2012-08-15 20:46:55 -05:00
|
|
|
struct socket {
|
2012-09-06 21:40:15 -05:00
|
|
|
sock: int,
|
2012-06-06 23:52:41 -05:00
|
|
|
|
|
|
|
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)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-09-05 17:58:43 -05:00
|
|
|
fn socket() -> socket {
|
|
|
|
socket {
|
|
|
|
sock: 1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-06-06 23:52:41 -05:00
|
|
|
fn closure(f: fn()) { f() }
|
|
|
|
|
|
|
|
fn setsockopt_bytes(_sock: int) { }
|
|
|
|
|
|
|
|
fn main() {}
|