Lines Matching refs:client

109     struct local_client *client;  in tcp_remove_client()  local
121 client = dm_hash_lookup_binary(sock_hash, csid, GULM_MAX_CSID_LEN); in tcp_remove_client()
122 if (client) in tcp_remove_client()
125 client->removeme = 1; in tcp_remove_client()
126 close(client->fd); in tcp_remove_client()
135 struct local_client *client; in alloc_client() local
142 client = malloc(sizeof(struct local_client)); in alloc_client()
143 if (!client) in alloc_client()
149 memset(client, 0, sizeof(struct local_client)); in alloc_client()
150 client->fd = fd; in alloc_client()
151 client->type = CLUSTER_DATA_SOCK; in alloc_client()
152 client->callback = read_from_tcpsock; in alloc_client()
154 *new_client = client; in alloc_client()
166 client->bits.net.flags = 1; /* indicate mangled CSID */ in alloc_client()
175 free(client); in alloc_client()
180 dm_hash_insert_binary(sock_hash, csid, GULM_MAX_CSID_LEN, client); in alloc_client()
261 static int read_from_tcpsock(struct local_client *client, char *buf, int len, char *csid, in read_from_tcpsock() argument
270 DEBUGLOG("read_from_tcpsock fd %d\n", client->fd); in read_from_tcpsock()
274 getpeername(client->fd, (struct sockaddr *)&addr, &slen); in read_from_tcpsock()
280 status = really_read(client->fd, buf, sizeof(struct clvm_header)); in read_from_tcpsock()
290 status2 = really_read(client->fd, buf+status, arglen); in read_from_tcpsock()
308 close(client->fd); in read_from_tcpsock()
311 if (client->bits.net.flags) in read_from_tcpsock()
321 process_message(client, buf, status, csid); in read_from_tcpsock()
380 struct local_client *client; in tcp_send_message() local
392 client = dm_hash_lookup_binary(sock_hash, csid, GULM_MAX_CSID_LEN); in tcp_send_message()
393 if (!client) in tcp_send_message()
395 status = gulm_connect_csid(csid, &client); in tcp_send_message()
399 DEBUGLOG("tcp_send_message, fd = %d\n", client->fd); in tcp_send_message()
401 return write(client->fd, buf, msglen); in tcp_send_message()