@@ -117,6 +117,16 @@ - (size_t)writeCString: (const char*)str { return [self writeNBytes: strlen(str) fromBuffer: (const uint8_t*)str]; } + +- close +{ + if (sock < 0) { + /* FIXME: Throw exception */ + return nil; + } + + return self; +} @end