Lines Matching refs:__sock
22 : __sock(-1), __is(NULL), __os(NULL), __error(false) in Socket()
33 : __sock(-1), __is(NULL), __os(NULL), __error(false) in Socket()
72 if (__sock == -1 && !__error) { in open()
92 if ((__sock = socket(AF_INET, SOCK_STREAM, 0)) == -1) { in open()
101 if (::bind(__sock, (sockaddr *)&cin, sizeof(cin)) != 0) { in open()
103 ::close(__sock); in open()
104 __sock = -1; in open()
109 if (::connect(__sock, (sockaddr *)&(sin), sizeof(sin)) != 0) { in open()
111 ::close(__sock); in open()
112 __sock = -1; in open()
121 if (__sock != -1) { in close()
122 ::shutdown(__sock, 2); in close()
123 ::close(__sock); in close()
124 __sock = -1; in close()
130 return __sock == -1 || __error; in fail()
148 size = ::recv(__sock, buffer, size, flags); in read()
163 size = ::send(__sock, buffer, size, flags); in write()