2012-06-06 23:52:41 -05:00
|
|
|
class socket {
|
|
|
|
let sock: int;
|
|
|
|
|
|
|
|
new() { self.sock = 1; }
|
|
|
|
|
|
|
|
drop { }
|
|
|
|
|
|
|
|
fn set_identity() {
|
2012-06-30 18:19:07 -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() {}
|