Lines Matching refs:fd
37 int fd; member
41 syncsocket_init(int fd) in syncsocket_init() argument
46 socket_set_nonblock(fd); in syncsocket_init()
48 sync_socket->fd = fd; in syncsocket_init()
54 syncsocket_connect(int fd, SockAddress* sockaddr, int timeout) in syncsocket_connect() argument
60 socket_set_nonblock(fd); in syncsocket_connect()
63 connect_status = socket_connect(fd, sockaddr); in syncsocket_connect()
73 iolooper_add_write(looper, fd); in syncsocket_connect()
76 iolooper_del_write(looper, fd); in syncsocket_connect()
96 sync_socket->fd = fd; in syncsocket_connect()
104 if (ssocket != NULL && ssocket->fd >= 0) { in syncsocket_close()
108 socket_close(ssocket->fd); in syncsocket_close()
109 ssocket->fd = -1; in syncsocket_close()
127 if (ssocket == NULL || ssocket->fd < 0 || ssocket->iolooper == NULL) { in syncsocket_start_read()
131 iolooper_add_read(ssocket->iolooper, ssocket->fd); in syncsocket_start_read()
138 if (ssocket == NULL || ssocket->fd < 0 || ssocket->iolooper == NULL) { in syncsocket_stop_read()
142 iolooper_del_read(ssocket->iolooper, ssocket->fd); in syncsocket_stop_read()
149 if (ssocket == NULL || ssocket->fd < 0 || ssocket->iolooper == NULL) { in syncsocket_start_write()
153 iolooper_add_write(ssocket->iolooper, ssocket->fd); in syncsocket_start_write()
160 if (ssocket == NULL || ssocket->fd < 0 || ssocket->iolooper == NULL) { in syncsocket_stop_write()
164 iolooper_del_write(ssocket->iolooper, ssocket->fd); in syncsocket_stop_write()
176 if (ssocket == NULL || ssocket->fd < 0 || ssocket->iolooper == NULL) { in syncsocket_read_absolute()
183 if (!iolooper_is_read(ssocket->iolooper, ssocket->fd)) { in syncsocket_read_absolute()
188 ret = socket_recv(ssocket->fd, buf, size); in syncsocket_read_absolute()
213 if (ssocket == NULL || ssocket->fd < 0 || ssocket->iolooper == NULL) { in syncsocket_write_absolute()
227 if (!iolooper_is_write(ssocket->iolooper, ssocket->fd)) { in syncsocket_write_absolute()
233 ret = socket_send(ssocket->fd, (const char*)buf + written, size - written); in syncsocket_write_absolute()
292 return (ssocket != NULL) ? ssocket->fd : -1; in syncsocket_get_socket()