Change printf mask %zu -> %lu
 for MS VC++ compatibility http://stackoverflow.com/questions/15610053/correct-printf-format-specifier-for-size-t-zu-or-iu
Add enum ns_error { NS_ERROR_NONE = 0, NS_ERROR_SEND, NS_ERROR_RECV};